armtek-uikit-react 1.0.2 → 1.0.3
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/lib/Adornment/package.json +7 -0
- package/lib/Alert/package.json +7 -0
- package/lib/Avatar/package.json +7 -0
- package/lib/AvatarGroup/package.json +6 -0
- package/lib/Badge/package.json +7 -0
- package/lib/Button/package.json +7 -7
- package/lib/ButtonGroup/package.json +6 -0
- package/lib/ButtonIcon/package.json +6 -0
- package/lib/Card/package.json +7 -0
- package/lib/Checkbox/package.json +6 -0
- package/lib/Chip/package.json +7 -0
- package/lib/DateField/package.json +6 -0
- package/lib/DatePicker/package.json +6 -0
- package/lib/DateService/package.json +6 -0
- package/lib/HelperText/package.json +6 -0
- package/lib/Interval/package.json +6 -0
- package/lib/IntervalSlide/package.json +6 -0
- package/lib/ListItem/package.json +6 -0
- package/lib/Loader/package.json +7 -0
- package/lib/Logo/package.json +7 -0
- package/lib/Password/package.json +6 -0
- package/lib/Period/package.json +6 -0
- package/lib/PeriodSelect/package.json +6 -0
- package/lib/Radio/package.json +6 -0
- package/lib/Rating/package.json +6 -0
- package/lib/RcSlider/package.json +6 -0
- package/lib/Select/package.json +6 -0
- package/lib/Slider/package.json +7 -0
- package/lib/Status/package.json +7 -0
- package/lib/StepItem/package.json +6 -0
- package/lib/StepItemIcon/package.json +6 -0
- package/lib/Stepper/package.json +7 -0
- package/lib/Switch/package.json +6 -0
- package/lib/TextArea/package.json +6 -0
- package/lib/TextField/package.json +6 -0
- package/lib/TimeField/package.json +6 -0
- package/lib/TimePicker/package.json +6 -0
- package/lib/Tooltip/package.json +7 -0
- package/lib/cjs/Adornment/Adornment.d.ts +7 -0
- package/lib/cjs/Adornment/Adornment.js +47 -0
- package/lib/cjs/Adornment/Adornment.module.scss +18 -0
- package/lib/cjs/Alert/Alert.d.ts +10 -0
- package/lib/cjs/Alert/Alert.js +46 -0
- package/lib/cjs/Alert/Alert.module.scss +38 -0
- package/lib/cjs/Avatar/Avatar.d.ts +13 -0
- package/lib/cjs/Avatar/Avatar.js +50 -0
- package/lib/cjs/Avatar/Avatar.module.scss +82 -0
- package/lib/cjs/Avatar/AvatarGroup.d.ts +8 -0
- package/lib/cjs/Avatar/AvatarGroup.js +34 -0
- package/lib/cjs/Avatar/AvatarGroup.module.scss +48 -0
- package/lib/cjs/Badge/Badge.d.ts +11 -0
- package/lib/cjs/Badge/Badge.js +34 -0
- package/lib/cjs/Badge/Badge.module.scss +83 -0
- package/lib/cjs/Button/Button.css +3 -0
- package/lib/cjs/{ui/Button → Button}/Button.d.ts +1 -1
- package/lib/cjs/{ui/Button → Button}/Button.js +4 -5
- package/lib/cjs/{ui/Button → Button}/Button.module.scss +1 -1
- package/lib/cjs/Card/Card.d.ts +4 -0
- package/lib/cjs/Card/Card.js +19 -0
- package/lib/cjs/Card/Card.module.scss +7 -0
- package/lib/cjs/Chip/Chip.d.ts +13 -0
- package/lib/cjs/Chip/Chip.js +41 -0
- package/lib/cjs/Chip/Chip.module.scss +96 -0
- package/lib/cjs/Form/Checkbox/Checkbox.d.ts +12 -0
- package/lib/cjs/Form/Checkbox/Checkbox.js +53 -0
- package/lib/cjs/Form/Checkbox/Checkbox.module.scss +297 -0
- package/lib/cjs/Form/Checkbox/Radio.d.ts +3 -0
- package/lib/cjs/Form/Checkbox/Radio.js +21 -0
- package/lib/cjs/Form/DateField/DateField.d.ts +26 -0
- package/lib/cjs/Form/DateField/DateField.js +71 -0
- package/lib/cjs/Form/DateField/DateField.module.scss +1 -0
- package/lib/cjs/Form/DateField/TimeField.d.ts +3 -0
- package/lib/cjs/Form/DateField/TimeField.js +19 -0
- package/lib/cjs/Form/DatePicker/DatePicker.d.ts +7 -0
- package/lib/cjs/Form/DatePicker/DatePicker.js +49 -0
- package/lib/cjs/Form/DatePicker/DatePicker.module.scss +7 -0
- package/lib/cjs/Form/DatePicker/PeriodSelect.d.ts +2 -0
- package/lib/cjs/Form/DatePicker/PeriodSelect.js +29 -0
- package/lib/cjs/Form/DatePicker/TimePicker.d.ts +2 -0
- package/lib/cjs/Form/DatePicker/TimePicker.js +28 -0
- package/lib/cjs/Form/DatePicker/styles.css +766 -0
- package/lib/cjs/Form/Interval/Interval.d.ts +21 -0
- package/lib/cjs/Form/Interval/Interval.js +98 -0
- package/lib/cjs/Form/Interval/Interval.module.scss +35 -0
- package/lib/cjs/Form/Interval/IntervalSlide.d.ts +4 -0
- package/lib/cjs/Form/Interval/IntervalSlide.js +48 -0
- package/lib/cjs/Form/Password/Password.d.ts +12 -0
- package/lib/cjs/Form/Password/Password.js +46 -0
- package/lib/cjs/Form/Password/Password.module.scss +2 -0
- package/lib/cjs/Form/Period/Period.d.ts +15 -0
- package/lib/cjs/Form/Period/Period.js +69 -0
- package/lib/cjs/Form/Period/Period.module.scss +10 -0
- package/lib/cjs/Form/Rating/Rating.d.ts +10 -0
- package/lib/cjs/Form/Rating/Rating.js +54 -0
- package/lib/cjs/Form/Rating/Rating.module.scss +19 -0
- package/lib/cjs/Form/Select/Select.d.ts +23 -0
- package/lib/cjs/Form/Select/Select.js +139 -0
- package/lib/cjs/Form/Select/Select.module.scss +26 -0
- package/lib/cjs/Form/Switch/Switch.d.ts +7 -0
- package/lib/cjs/Form/Switch/Switch.js +30 -0
- package/lib/cjs/Form/Switch/Switch.module.scss +69 -0
- package/lib/cjs/Form/TextArea/TextArea.d.ts +4 -0
- package/lib/cjs/Form/TextArea/TextArea.js +46 -0
- package/lib/cjs/Form/TextArea/TextArea.module.scss +15 -0
- package/lib/cjs/Form/TextField/TextField.d.ts +40 -0
- package/lib/cjs/Form/TextField/TextField.js +152 -0
- package/lib/cjs/Form/TextField/TextField.module.scss +160 -0
- package/lib/cjs/List/ListItem.d.ts +10 -0
- package/lib/cjs/List/ListItem.js +60 -0
- package/lib/cjs/List/ListItem.module.scss +34 -0
- package/lib/cjs/Loader/Loader.d.ts +6 -0
- package/lib/cjs/Loader/Loader.js +120 -0
- package/lib/cjs/Loader/Loader.module.scss +37 -0
- package/lib/cjs/Logo/Logo.d.ts +12 -0
- package/lib/cjs/Logo/Logo.js +102 -0
- package/lib/cjs/Logo/Logo.module.scss +29 -0
- package/lib/cjs/Slider/RcSlider.d.ts +2 -0
- package/lib/cjs/Slider/RcSlider.js +9 -0
- package/lib/cjs/Slider/Slider.d.ts +8 -0
- package/lib/cjs/Slider/Slider.js +34 -0
- package/lib/cjs/Slider/Slider.module.scss +6 -0
- package/lib/cjs/Slider/style.css +281 -0
- package/lib/cjs/Status/Status.d.ts +10 -0
- package/lib/cjs/Status/Status.js +31 -0
- package/lib/cjs/Status/Status.module.scss +45 -0
- package/lib/cjs/Stepper/StepItem.d.ts +14 -0
- package/lib/cjs/Stepper/StepItem.js +56 -0
- package/lib/cjs/Stepper/StepItem.module.scss +67 -0
- package/lib/cjs/Stepper/StepItemIcon.d.ts +11 -0
- package/lib/cjs/Stepper/StepItemIcon.js +40 -0
- package/lib/cjs/Stepper/StepItemIcon.module.scss +47 -0
- package/lib/cjs/Stepper/Stepper.d.ts +11 -0
- package/lib/cjs/Stepper/Stepper.js +45 -0
- package/lib/cjs/Stepper/Stepper.module.scss +34 -0
- package/lib/cjs/Tooltip/Tooltip.d.ts +7 -0
- package/lib/cjs/Tooltip/Tooltip.js +32 -0
- package/lib/cjs/Tooltip/Tooltip.module.scss +18 -0
- package/lib/cjs/Typography/HelperText/HelperText.d.ts +6 -0
- package/lib/cjs/Typography/HelperText/HelperText.js +28 -0
- package/lib/cjs/Typography/HelperText/HelperText.module.scss +10 -0
- package/lib/cjs/assets/fonts.scss +0 -18
- package/lib/cjs/assets/global.css +36 -0
- package/lib/cjs/assets/styles.scss +0 -10
- package/lib/cjs/index.d.ts +29 -29
- package/lib/cjs/index.js +30 -2
- package/lib/dist/armtek-uikit-react-index.js +293 -293
- package/lib/dist/armtek-uikit-react-index.min.js +1 -1
- package/lib/esm/Adornment/Adornment.d.ts +7 -0
- package/lib/esm/Adornment/Adornment.js +40 -0
- package/lib/esm/Adornment/Adornment.module.scss +18 -0
- package/lib/esm/Alert/Alert.d.ts +10 -0
- package/lib/esm/Alert/Alert.js +41 -0
- package/lib/esm/Alert/Alert.module.scss +38 -0
- package/lib/esm/Avatar/Avatar.d.ts +13 -0
- package/lib/esm/Avatar/Avatar.js +45 -0
- package/lib/esm/Avatar/Avatar.module.scss +82 -0
- package/lib/esm/Avatar/AvatarGroup.d.ts +8 -0
- package/lib/esm/Avatar/AvatarGroup.js +29 -0
- package/lib/esm/Avatar/AvatarGroup.module.scss +48 -0
- package/lib/esm/Badge/Badge.d.ts +11 -0
- package/lib/esm/Badge/Badge.js +29 -0
- package/lib/esm/Badge/Badge.module.scss +83 -0
- package/lib/esm/Button/Button.css +3 -0
- package/lib/esm/{ui/Button → Button}/Button.d.ts +1 -1
- package/lib/esm/{ui/Button → Button}/Button.js +5 -5
- package/lib/esm/{ui/Button → Button}/Button.module.scss +1 -1
- package/lib/esm/Card/Card.d.ts +4 -0
- package/lib/esm/Card/Card.js +13 -0
- package/lib/esm/Card/Card.module.scss +7 -0
- package/lib/esm/Chip/Chip.d.ts +13 -0
- package/lib/esm/Chip/Chip.js +36 -0
- package/lib/esm/Chip/Chip.module.scss +96 -0
- package/lib/esm/Form/Checkbox/Checkbox.d.ts +12 -0
- package/lib/esm/Form/Checkbox/Checkbox.js +49 -0
- package/lib/esm/Form/Checkbox/Checkbox.module.scss +297 -0
- package/lib/esm/Form/Checkbox/Radio.d.ts +3 -0
- package/lib/esm/Form/Checkbox/Radio.js +15 -0
- package/lib/esm/Form/DateField/DateField.d.ts +26 -0
- package/lib/esm/Form/DateField/DateField.js +66 -0
- package/lib/esm/Form/DateField/DateField.module.scss +1 -0
- package/lib/esm/Form/DateField/TimeField.d.ts +3 -0
- package/lib/esm/Form/DateField/TimeField.js +13 -0
- package/lib/esm/Form/DatePicker/DatePicker.d.ts +7 -0
- package/lib/esm/Form/DatePicker/DatePicker.js +41 -0
- package/lib/esm/Form/DatePicker/DatePicker.module.scss +7 -0
- package/lib/esm/Form/DatePicker/PeriodSelect.d.ts +2 -0
- package/lib/esm/Form/DatePicker/PeriodSelect.js +24 -0
- package/lib/esm/Form/DatePicker/TimePicker.d.ts +2 -0
- package/lib/esm/Form/DatePicker/TimePicker.js +23 -0
- package/lib/esm/Form/DatePicker/styles.css +766 -0
- package/lib/esm/Form/Interval/Interval.d.ts +21 -0
- package/lib/esm/Form/Interval/Interval.js +94 -0
- package/lib/esm/Form/Interval/Interval.module.scss +35 -0
- package/lib/esm/Form/Interval/IntervalSlide.d.ts +4 -0
- package/lib/esm/Form/Interval/IntervalSlide.js +44 -0
- package/lib/esm/Form/Password/Password.d.ts +12 -0
- package/lib/esm/Form/Password/Password.js +41 -0
- package/lib/esm/Form/Password/Password.module.scss +2 -0
- package/lib/esm/Form/Period/Period.d.ts +15 -0
- package/lib/esm/Form/Period/Period.js +65 -0
- package/lib/esm/Form/Period/Period.module.scss +10 -0
- package/lib/esm/Form/Rating/Rating.d.ts +10 -0
- package/lib/esm/Form/Rating/Rating.js +50 -0
- package/lib/esm/Form/Rating/Rating.module.scss +19 -0
- package/lib/esm/Form/Select/Select.d.ts +23 -0
- package/lib/esm/Form/Select/Select.js +135 -0
- package/lib/esm/Form/Select/Select.module.scss +26 -0
- package/lib/esm/Form/Switch/Switch.d.ts +7 -0
- package/lib/esm/Form/Switch/Switch.js +25 -0
- package/lib/esm/Form/Switch/Switch.module.scss +69 -0
- package/lib/esm/Form/TextArea/TextArea.d.ts +4 -0
- package/lib/esm/Form/TextArea/TextArea.js +41 -0
- package/lib/esm/Form/TextArea/TextArea.module.scss +15 -0
- package/lib/esm/Form/TextField/TextField.d.ts +40 -0
- package/lib/esm/Form/TextField/TextField.js +147 -0
- package/lib/esm/Form/TextField/TextField.module.scss +160 -0
- package/lib/esm/List/ListItem.d.ts +10 -0
- package/lib/esm/List/ListItem.js +53 -0
- package/lib/esm/List/ListItem.module.scss +34 -0
- package/lib/esm/Loader/Loader.d.ts +6 -0
- package/lib/esm/Loader/Loader.js +115 -0
- package/lib/esm/Loader/Loader.module.scss +37 -0
- package/lib/esm/Logo/Logo.d.ts +12 -0
- package/lib/esm/Logo/Logo.js +97 -0
- package/lib/esm/Logo/Logo.module.scss +29 -0
- package/lib/esm/Slider/RcSlider.d.ts +2 -0
- package/lib/esm/Slider/RcSlider.js +2 -0
- package/lib/esm/Slider/Slider.d.ts +8 -0
- package/lib/esm/Slider/Slider.js +29 -0
- package/lib/esm/Slider/Slider.module.scss +6 -0
- package/lib/esm/Slider/style.css +281 -0
- package/lib/esm/Status/Status.d.ts +10 -0
- package/lib/esm/Status/Status.js +26 -0
- package/lib/esm/Status/Status.module.scss +45 -0
- package/lib/esm/Stepper/StepItem.d.ts +14 -0
- package/lib/esm/Stepper/StepItem.js +51 -0
- package/lib/esm/Stepper/StepItem.module.scss +67 -0
- package/lib/esm/Stepper/StepItemIcon.d.ts +11 -0
- package/lib/esm/Stepper/StepItemIcon.js +34 -0
- package/lib/esm/Stepper/StepItemIcon.module.scss +47 -0
- package/lib/esm/Stepper/Stepper.d.ts +11 -0
- package/lib/esm/Stepper/Stepper.js +40 -0
- package/lib/esm/Stepper/Stepper.module.scss +34 -0
- package/lib/esm/Tooltip/Tooltip.d.ts +7 -0
- package/lib/esm/Tooltip/Tooltip.js +28 -0
- package/lib/esm/Tooltip/Tooltip.module.scss +18 -0
- package/lib/esm/Typography/HelperText/HelperText.d.ts +6 -0
- package/lib/esm/Typography/HelperText/HelperText.js +22 -0
- package/lib/esm/Typography/HelperText/HelperText.module.scss +10 -0
- package/lib/esm/assets/fonts.scss +0 -18
- package/lib/esm/assets/global.css +36 -0
- package/lib/esm/assets/styles.scss +0 -10
- package/lib/esm/index.d.ts +29 -29
- package/lib/esm/index.js +15 -1
- package/lib/helpers/package.json +6 -0
- package/lib/theme/package.json +6 -0
- package/lib/useClickOutside/package.json +6 -0
- package/package.json +6 -2
- package/lib/cjs/assets/index.d.ts +0 -16
- package/lib/cjs/ui/Button/style.css +0 -299
- package/lib/esm/assets/index.d.ts +0 -16
- package/lib/esm/ui/Button/style.css +0 -299
- /package/lib/cjs/{ui/Button → Button}/ButtonGroup.d.ts +0 -0
- /package/lib/cjs/{ui/Button → Button}/ButtonGroup.js +0 -0
- /package/lib/cjs/{ui/Button → Button}/ButtonIcon.d.ts +0 -0
- /package/lib/cjs/{ui/Button → Button}/ButtonIcon.js +0 -0
- /package/lib/cjs/{shared/hooks → hooks}/useClickOutside.d.ts +0 -0
- /package/lib/cjs/{shared/hooks → hooks}/useClickOutside.js +0 -0
- /package/lib/cjs/{shared/services → services}/DateService.d.ts +0 -0
- /package/lib/cjs/{shared/services → services}/DateService.js +0 -0
- /package/lib/esm/{ui/Button → Button}/ButtonGroup.d.ts +0 -0
- /package/lib/esm/{ui/Button → Button}/ButtonGroup.js +0 -0
- /package/lib/esm/{ui/Button → Button}/ButtonIcon.d.ts +0 -0
- /package/lib/esm/{ui/Button → Button}/ButtonIcon.js +0 -0
- /package/lib/esm/{shared/hooks → hooks}/useClickOutside.d.ts +0 -0
- /package/lib/esm/{shared/hooks → hooks}/useClickOutside.js +0 -0
- /package/lib/esm/{shared/services → services}/DateService.d.ts +0 -0
- /package/lib/esm/{shared/services → services}/DateService.js +0 -0
package/lib/Button/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "armtek-uikit-react/Button",
|
|
3
|
-
"private": true,
|
|
4
|
-
"main": "
|
|
5
|
-
"module": "
|
|
6
|
-
"types": "
|
|
7
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "armtek-uikit-react/Button",
|
|
3
|
+
"private": true,
|
|
4
|
+
"main": "..\\cjs\\Button\\Button.js",
|
|
5
|
+
"module": "..\\esm\\Button\\Button.js",
|
|
6
|
+
"types": "..\\esm\\Button\\Button.d.ts"
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
type PropsType = {
|
|
3
|
+
position?: 'start' | 'end';
|
|
4
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
5
|
+
declare const Adornment: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const AdornmentContainer: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Adornment;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.default = exports.AdornmentContainer = void 0;
|
|
6
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
// import css from './Adornment.module.scss'
|
|
9
|
+
|
|
10
|
+
const Adornment = props => {
|
|
11
|
+
let {
|
|
12
|
+
children,
|
|
13
|
+
position = 'end',
|
|
14
|
+
className,
|
|
15
|
+
...spanProps
|
|
16
|
+
} = props;
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
18
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
19
|
+
...spanProps,
|
|
20
|
+
className: (0, _clsx.default)(className, {
|
|
21
|
+
'adornment_start': position === 'start',
|
|
22
|
+
'adornment_end': position !== 'start'
|
|
23
|
+
}),
|
|
24
|
+
children: children
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
const AdornmentContainer = props => {
|
|
29
|
+
let {
|
|
30
|
+
position = 'start',
|
|
31
|
+
className,
|
|
32
|
+
children,
|
|
33
|
+
...inputProps
|
|
34
|
+
} = props;
|
|
35
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
36
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
37
|
+
...inputProps,
|
|
38
|
+
className: (0, _clsx.default)('adornmentContainer', {
|
|
39
|
+
['adornmentContainer_end']: position !== 'start'
|
|
40
|
+
}, className),
|
|
41
|
+
children: children
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
exports.AdornmentContainer = AdornmentContainer;
|
|
46
|
+
var _default = Adornment;
|
|
47
|
+
exports.default = _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@import "../assets/styles";
|
|
2
|
+
|
|
3
|
+
.adornmentContainer{
|
|
4
|
+
display: flex;
|
|
5
|
+
}
|
|
6
|
+
.adornmentContainer_end{
|
|
7
|
+
margin-left: auto;
|
|
8
|
+
}
|
|
9
|
+
.adornment_end{
|
|
10
|
+
& + * {
|
|
11
|
+
margin-left: $size-step;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
.adornment_start{
|
|
15
|
+
& + * {
|
|
16
|
+
margin-left: $size-step;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ColorStatusType } from '../shared/types/theme';
|
|
2
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
export type AlertProps = {
|
|
4
|
+
status: ColorStatusType;
|
|
5
|
+
title: string;
|
|
6
|
+
children: ReactNode | string;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
9
|
+
declare const Alert: (props: AlertProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default Alert;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
var _AlertModule = _interopRequireDefault(require("./Alert.module.scss"));
|
|
7
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
8
|
+
var _ButtonIcon = _interopRequireDefault(require("../Button/ButtonIcon"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
const Alert = props => {
|
|
11
|
+
let {
|
|
12
|
+
title,
|
|
13
|
+
children,
|
|
14
|
+
status = 'info',
|
|
15
|
+
onClose,
|
|
16
|
+
className,
|
|
17
|
+
...restProps
|
|
18
|
+
} = props;
|
|
19
|
+
let icon = 'info';
|
|
20
|
+
if (status === 'error') icon = 'bolt';else if (status === 'warning') icon = 'warning';else if (status === 'success') icon = 'task_alt';
|
|
21
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
22
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
23
|
+
...restProps,
|
|
24
|
+
className: (0, _clsx.default)(_AlertModule.default.alert, _AlertModule.default['alert_' + status], className),
|
|
25
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
26
|
+
className: (0, _clsx.default)(_AlertModule.default.alert__icon, 'material_icon'),
|
|
27
|
+
children: icon
|
|
28
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
29
|
+
className: _AlertModule.default.alert__title,
|
|
30
|
+
children: props.title
|
|
31
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
32
|
+
children: props.children
|
|
33
|
+
}), !!onClose && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonIcon.default, {
|
|
34
|
+
onClick: onClose,
|
|
35
|
+
size: 'small',
|
|
36
|
+
color: 'neutral',
|
|
37
|
+
variant: 'transparent',
|
|
38
|
+
className: (0, _clsx.default)(_AlertModule.default.alert__close, 'material_icon'),
|
|
39
|
+
children: "close"
|
|
40
|
+
})]
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
var _default = Alert;
|
|
45
|
+
exports.default = _default;
|
|
46
|
+
module.exports = exports.default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@import "../assets/styles";
|
|
2
|
+
|
|
3
|
+
.alert{
|
|
4
|
+
padding: calc($size-step * 2) calc($size-step * 5) calc($size-step * 2) calc($size-step * 7);
|
|
5
|
+
background: $color-gray-300;
|
|
6
|
+
border-radius: $radius;
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
.alert__title{
|
|
10
|
+
font-weight: 700;
|
|
11
|
+
margin-bottom: calc($size-step / 2);
|
|
12
|
+
}
|
|
13
|
+
.alert__close{
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: calc($size-step / 2);
|
|
16
|
+
right: calc($size-step / 2);
|
|
17
|
+
}
|
|
18
|
+
.alert__icon{
|
|
19
|
+
position: absolute;
|
|
20
|
+
top: calc($size-step * 2);
|
|
21
|
+
left: calc($size-step * 2);
|
|
22
|
+
}
|
|
23
|
+
.alert_success{
|
|
24
|
+
color: $color-success-dark;
|
|
25
|
+
background: $color-greent-50;
|
|
26
|
+
}
|
|
27
|
+
.alert_warning{
|
|
28
|
+
color: $color-secondary-dark;
|
|
29
|
+
background: $color-orange-50;
|
|
30
|
+
}
|
|
31
|
+
.alert_info{
|
|
32
|
+
color: $color-primary-dark;
|
|
33
|
+
background: $color-blue-50;
|
|
34
|
+
}
|
|
35
|
+
.alert_error{
|
|
36
|
+
color: $color-error-dark;
|
|
37
|
+
background: $color-red-50;
|
|
38
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { ColorStatusType, SizeType } from '../shared/types/theme';
|
|
3
|
+
export type AvatarProps = {
|
|
4
|
+
photo?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
href?: string;
|
|
7
|
+
linkProps?: HTMLAttributes<HTMLAnchorElement>;
|
|
8
|
+
icon?: string;
|
|
9
|
+
size?: Exclude<SizeType, 'extraLarge'>;
|
|
10
|
+
status?: Exclude<ColorStatusType, 'info'>;
|
|
11
|
+
};
|
|
12
|
+
declare const Avatar: (props: AvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default Avatar;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
var _AvatarModule = _interopRequireDefault(require("./Avatar.module.scss"));
|
|
7
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const getLetters = name => {
|
|
10
|
+
let nameParts = name.split(' ');
|
|
11
|
+
return nameParts[0].split('')[0] + (nameParts[1] ? nameParts[1].split('')[0] : '');
|
|
12
|
+
};
|
|
13
|
+
const Avatar = props => {
|
|
14
|
+
let icon = props.icon;
|
|
15
|
+
if (!props.icon && !props.name && !props.photo) icon = 'person';
|
|
16
|
+
let content = props.photo ? /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
17
|
+
src: props.photo,
|
|
18
|
+
className: _AvatarModule.default.avatar__img,
|
|
19
|
+
alt: props.name,
|
|
20
|
+
title: props.name
|
|
21
|
+
}) : props.name ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
22
|
+
className: _AvatarModule.default.avatar__name,
|
|
23
|
+
children: getLetters(props.name)
|
|
24
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
25
|
+
className: (0, _clsx.default)(_AvatarModule.default.avatar__icon, 'material_icon_solid'),
|
|
26
|
+
children: icon
|
|
27
|
+
});
|
|
28
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
29
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
30
|
+
className: (0, _clsx.default)(_AvatarModule.default.avatar, _AvatarModule.default['avatar_' + props.size]),
|
|
31
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
32
|
+
className: _AvatarModule.default.avatar__inner,
|
|
33
|
+
children: props.href ? /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
34
|
+
href: props.href,
|
|
35
|
+
...props.linkProps,
|
|
36
|
+
className: _AvatarModule.default.avatar__inner,
|
|
37
|
+
children: content
|
|
38
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
39
|
+
className: _AvatarModule.default.avatar__inner,
|
|
40
|
+
children: content
|
|
41
|
+
})
|
|
42
|
+
}), props.status && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
43
|
+
className: (0, _clsx.default)(_AvatarModule.default.avatar__status, _AvatarModule.default['avatar__status_' + props.status])
|
|
44
|
+
})]
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
var _default = Avatar;
|
|
49
|
+
exports.default = _default;
|
|
50
|
+
module.exports = exports.default;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
@import "../assets/styles";
|
|
2
|
+
|
|
3
|
+
.avatar{
|
|
4
|
+
width: $size-elarge;
|
|
5
|
+
height: $size-elarge;
|
|
6
|
+
min-width: $size-elarge;
|
|
7
|
+
border-radius: 50%;
|
|
8
|
+
background: $color-primary;
|
|
9
|
+
color: #fff;
|
|
10
|
+
position: relative;
|
|
11
|
+
}
|
|
12
|
+
.avatar__inner{
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
border-radius: 50%;
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
@include flex(center);
|
|
18
|
+
}
|
|
19
|
+
.avatar_medium{
|
|
20
|
+
width: 40px;
|
|
21
|
+
height: 40px;
|
|
22
|
+
min-width: 40px;
|
|
23
|
+
& .avatar__name{
|
|
24
|
+
font-size: 16px;
|
|
25
|
+
}
|
|
26
|
+
& .avatar__icon{
|
|
27
|
+
font-size: 30px;
|
|
28
|
+
}
|
|
29
|
+
& .avatar__status{
|
|
30
|
+
right: -2px;
|
|
31
|
+
bottom: -2px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
.avatar_small{
|
|
35
|
+
width: 24px;
|
|
36
|
+
height: 24px;
|
|
37
|
+
min-width: 24px;
|
|
38
|
+
& .avatar__name{
|
|
39
|
+
font-size: 12px;
|
|
40
|
+
}
|
|
41
|
+
& .avatar__icon{
|
|
42
|
+
font-size: 20px;
|
|
43
|
+
}
|
|
44
|
+
& .avatar__status{
|
|
45
|
+
right: -5px;
|
|
46
|
+
bottom: -2px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
.avatar__inner{
|
|
50
|
+
font-size: 0;
|
|
51
|
+
}
|
|
52
|
+
.avatar__name{
|
|
53
|
+
font-size: 24px;
|
|
54
|
+
}
|
|
55
|
+
.avatar__icon{
|
|
56
|
+
font-size: 50px;
|
|
57
|
+
}
|
|
58
|
+
.avatar__img{
|
|
59
|
+
display: block;
|
|
60
|
+
width: 100%;
|
|
61
|
+
height: 100%;
|
|
62
|
+
object-fit: cover;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.avatar__status{
|
|
66
|
+
position: absolute;
|
|
67
|
+
width: 14px;
|
|
68
|
+
height: 14px;
|
|
69
|
+
border:1px solid #fff;
|
|
70
|
+
border-radius: 50%;
|
|
71
|
+
right: 0;
|
|
72
|
+
bottom: 0;
|
|
73
|
+
}
|
|
74
|
+
.avatar__status_success{
|
|
75
|
+
background: $color-success;
|
|
76
|
+
}
|
|
77
|
+
.avatar__status_error{
|
|
78
|
+
background: $color-error-dark;
|
|
79
|
+
}
|
|
80
|
+
.avatar__status_warning{
|
|
81
|
+
background: $color-warning;
|
|
82
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AvatarProps } from './Avatar';
|
|
3
|
+
export type AvatarGroupProps = {
|
|
4
|
+
limit?: number;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
} & Pick<AvatarProps, 'size'>;
|
|
7
|
+
declare const AvatarGroup: (props: AvatarGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default AvatarGroup;
|