armtek-uikit-react 1.0.2 → 1.0.4
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
|
@@ -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,41 @@
|
|
|
1
|
+
import css from './Alert.module.scss';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import ButtonIcon from '../Button/ButtonIcon';
|
|
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";
|
|
7
|
+
const Alert = props => {
|
|
8
|
+
let {
|
|
9
|
+
title,
|
|
10
|
+
children,
|
|
11
|
+
status = 'info',
|
|
12
|
+
onClose,
|
|
13
|
+
className,
|
|
14
|
+
...restProps
|
|
15
|
+
} = props;
|
|
16
|
+
let icon = 'info';
|
|
17
|
+
if (status === 'error') icon = 'bolt';else if (status === 'warning') icon = 'warning';else if (status === 'success') icon = 'task_alt';
|
|
18
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
19
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
20
|
+
...restProps,
|
|
21
|
+
className: clsx(css.alert, css['alert_' + status], className),
|
|
22
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
23
|
+
className: clsx(css.alert__icon, 'material_icon'),
|
|
24
|
+
children: icon
|
|
25
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
26
|
+
className: css.alert__title,
|
|
27
|
+
children: props.title
|
|
28
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
29
|
+
children: props.children
|
|
30
|
+
}), !!onClose && /*#__PURE__*/_jsx(ButtonIcon, {
|
|
31
|
+
onClick: onClose,
|
|
32
|
+
size: 'small',
|
|
33
|
+
color: 'neutral',
|
|
34
|
+
variant: 'transparent',
|
|
35
|
+
className: clsx(css.alert__close, 'material_icon'),
|
|
36
|
+
children: "close"
|
|
37
|
+
})]
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
export default Alert;
|
|
@@ -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,45 @@
|
|
|
1
|
+
import css from './Avatar.module.scss';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
+
const getLetters = name => {
|
|
7
|
+
let nameParts = name.split(' ');
|
|
8
|
+
return nameParts[0].split('')[0] + (nameParts[1] ? nameParts[1].split('')[0] : '');
|
|
9
|
+
};
|
|
10
|
+
const Avatar = props => {
|
|
11
|
+
let icon = props.icon;
|
|
12
|
+
if (!props.icon && !props.name && !props.photo) icon = 'person';
|
|
13
|
+
let content = props.photo ? /*#__PURE__*/_jsx("img", {
|
|
14
|
+
src: props.photo,
|
|
15
|
+
className: css.avatar__img,
|
|
16
|
+
alt: props.name,
|
|
17
|
+
title: props.name
|
|
18
|
+
}) : props.name ? /*#__PURE__*/_jsx("span", {
|
|
19
|
+
className: css.avatar__name,
|
|
20
|
+
children: getLetters(props.name)
|
|
21
|
+
}) : /*#__PURE__*/_jsx("span", {
|
|
22
|
+
className: clsx(css.avatar__icon, 'material_icon_solid'),
|
|
23
|
+
children: icon
|
|
24
|
+
});
|
|
25
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
26
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
27
|
+
className: clsx(css.avatar, css['avatar_' + props.size]),
|
|
28
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
29
|
+
className: css.avatar__inner,
|
|
30
|
+
children: props.href ? /*#__PURE__*/_jsx("a", {
|
|
31
|
+
href: props.href,
|
|
32
|
+
...props.linkProps,
|
|
33
|
+
className: css.avatar__inner,
|
|
34
|
+
children: content
|
|
35
|
+
}) : /*#__PURE__*/_jsx("span", {
|
|
36
|
+
className: css.avatar__inner,
|
|
37
|
+
children: content
|
|
38
|
+
})
|
|
39
|
+
}), props.status && /*#__PURE__*/_jsx("span", {
|
|
40
|
+
className: clsx(css.avatar__status, css['avatar__status_' + props.status])
|
|
41
|
+
})]
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
export default Avatar;
|
|
@@ -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;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Children, cloneElement, isValidElement } from 'react';
|
|
2
|
+
import css from './AvatarGroup.module.scss';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
+
const AvatarGroup = props => {
|
|
8
|
+
let arrChildren = Children.toArray(props.children);
|
|
9
|
+
let visiblePart = arrChildren.slice(0, props.limit || 3);
|
|
10
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
11
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
12
|
+
className: clsx(css.avatarGroup, css['avatarGroup_' + props.size]),
|
|
13
|
+
children: [visiblePart.length < arrChildren.length && /*#__PURE__*/_jsxs("div", {
|
|
14
|
+
className: clsx(css.avatarGroup__item, css.avatarGroup__remains, css['avatarGroup__remains_' + props.size]),
|
|
15
|
+
children: ["+", arrChildren.length - visiblePart.length]
|
|
16
|
+
}), visiblePart.map((item, index) => {
|
|
17
|
+
return /*#__PURE__*/_jsx("div", {
|
|
18
|
+
className: css.avatarGroup__item,
|
|
19
|
+
children: /*#__PURE__*/isValidElement(item) && /*#__PURE__*/cloneElement(item, {
|
|
20
|
+
...item.props,
|
|
21
|
+
size: props.size,
|
|
22
|
+
key: index
|
|
23
|
+
})
|
|
24
|
+
}, index);
|
|
25
|
+
})]
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
export default AvatarGroup;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@import "../assets/styles";
|
|
2
|
+
|
|
3
|
+
.avatarGroup{
|
|
4
|
+
@include flex(flex-end);
|
|
5
|
+
transform: scale(-1, 1);
|
|
6
|
+
}
|
|
7
|
+
.avatarGroup_medium{
|
|
8
|
+
& .avatarGroup__item + .avatarGroup__item{
|
|
9
|
+
margin-left: -12px;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
.avatarGroup_small{
|
|
13
|
+
& .avatarGroup__item + .avatarGroup__item{
|
|
14
|
+
margin-left: -8px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
.avatarGroup__remains{
|
|
18
|
+
width: 60px;
|
|
19
|
+
height: 60px;
|
|
20
|
+
min-width: 60px;
|
|
21
|
+
position: relative;
|
|
22
|
+
@include flex(center);
|
|
23
|
+
background: $color-neutral-light;
|
|
24
|
+
font-size: 24px;
|
|
25
|
+
color: #fff;
|
|
26
|
+
}
|
|
27
|
+
.avatarGroup__remains_medium{
|
|
28
|
+
width: 44px;
|
|
29
|
+
height: 44px;
|
|
30
|
+
min-width: 44px;
|
|
31
|
+
font-size: 16px;
|
|
32
|
+
}
|
|
33
|
+
.avatarGroup__remains_small{
|
|
34
|
+
width: 28px;
|
|
35
|
+
height: 28px;
|
|
36
|
+
min-width: 28px;
|
|
37
|
+
font-size: 12px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.avatarGroup__item{
|
|
41
|
+
position: relative;
|
|
42
|
+
transform: scale(-1, 1);
|
|
43
|
+
border: 2px solid #fff;
|
|
44
|
+
border-radius: 50%;
|
|
45
|
+
& + .avatarGroup__item{
|
|
46
|
+
margin-left: -15px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ColorStatusType, ColorType, ShapeType } from '../shared/types/theme';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export type BadgeProps = {
|
|
4
|
+
color?: ColorType | ColorStatusType;
|
|
5
|
+
children: ReactNode | string;
|
|
6
|
+
shape?: ShapeType;
|
|
7
|
+
position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
8
|
+
badgeText?: string;
|
|
9
|
+
};
|
|
10
|
+
declare function Badge(props: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default Badge;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import css from './Badge.module.scss';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
+
function Badge(props) {
|
|
7
|
+
let {
|
|
8
|
+
color,
|
|
9
|
+
shape,
|
|
10
|
+
position
|
|
11
|
+
} = props;
|
|
12
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
13
|
+
children: /*#__PURE__*/_jsxs("span", {
|
|
14
|
+
className: css.badge,
|
|
15
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
16
|
+
className: css.badge__content,
|
|
17
|
+
children: props.children
|
|
18
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
19
|
+
className: clsx(css.badge__item, css['badge__item_' + color], css['badge__item_' + shape], css['badge__item_' + position], {
|
|
20
|
+
[css.badge__item_content]: !!props.badgeText && !shape,
|
|
21
|
+
[css.badge__item_content_circle]: !!props.badgeText && shape === 'circle',
|
|
22
|
+
[css.badge__item_content_square]: !!props.badgeText && shape === 'square'
|
|
23
|
+
}),
|
|
24
|
+
children: props.badgeText
|
|
25
|
+
})]
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export default Badge;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
@import "../assets/styles";
|
|
2
|
+
|
|
3
|
+
.badge{
|
|
4
|
+
display: inline-block;
|
|
5
|
+
position: relative;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
$vertical_offset: calc(100% - 6px);
|
|
9
|
+
$horizontal_offset: calc(100% - 6px);
|
|
10
|
+
|
|
11
|
+
.badge__item{
|
|
12
|
+
background: $color-error;
|
|
13
|
+
color: #fff;
|
|
14
|
+
position: absolute;
|
|
15
|
+
width: 8px;
|
|
16
|
+
height: 8px;
|
|
17
|
+
bottom: $vertical_offset;
|
|
18
|
+
left: $horizontal_offset;
|
|
19
|
+
border-radius: 50%;
|
|
20
|
+
&_primary{
|
|
21
|
+
background: $color-primary;
|
|
22
|
+
}
|
|
23
|
+
&_secondary{
|
|
24
|
+
background: $color-primary;
|
|
25
|
+
}
|
|
26
|
+
&_neutral{
|
|
27
|
+
background: $color-neutral;
|
|
28
|
+
}
|
|
29
|
+
&_error{
|
|
30
|
+
background: $color-error;
|
|
31
|
+
}
|
|
32
|
+
&_info{
|
|
33
|
+
background: $color-info;
|
|
34
|
+
}
|
|
35
|
+
&_warning{
|
|
36
|
+
background: $color-warning;
|
|
37
|
+
}
|
|
38
|
+
&_success{
|
|
39
|
+
background: $color-success;
|
|
40
|
+
color: $color-gray-900;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
.badge__item_content{
|
|
44
|
+
width: 20px;
|
|
45
|
+
height: 20px;
|
|
46
|
+
@include flex(center);
|
|
47
|
+
font-size: 12px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.badge__item_content_circle,
|
|
51
|
+
.badge__item_content_square{
|
|
52
|
+
width: auto;
|
|
53
|
+
height: auto;
|
|
54
|
+
border-radius: $radius;
|
|
55
|
+
font-size: 12px;
|
|
56
|
+
font-weight: 500;
|
|
57
|
+
line-height: 20px;
|
|
58
|
+
padding:0 6px;
|
|
59
|
+
}
|
|
60
|
+
.badge__item_content_circle{
|
|
61
|
+
border-radius: 10px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.badge__item_top-right{
|
|
65
|
+
bottom: $vertical_offset;
|
|
66
|
+
left: $horizontal_offset;
|
|
67
|
+
}
|
|
68
|
+
.badge__item_top-left{
|
|
69
|
+
bottom: $vertical_offset;
|
|
70
|
+
right: $horizontal_offset;
|
|
71
|
+
left: auto;
|
|
72
|
+
}
|
|
73
|
+
.badge__item_bottom-right{
|
|
74
|
+
top: $vertical_offset;
|
|
75
|
+
left: $horizontal_offset;
|
|
76
|
+
bottom: auto;
|
|
77
|
+
}
|
|
78
|
+
.badge__item_bottom-left{
|
|
79
|
+
top: $vertical_offset;
|
|
80
|
+
right: $horizontal_offset;
|
|
81
|
+
left: auto;
|
|
82
|
+
bottom: auto;
|
|
83
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { ColorThemeType, ColorType, SizeType, VariantType } from '
|
|
2
|
+
import { ColorThemeType, ColorType, SizeType, VariantType } from '../shared/types/theme';
|
|
3
3
|
type OwnProps<T extends ElementType = ElementType> = {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
size?: SizeType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import css from './Button.module.scss';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -20,16 +20,16 @@ const Button = props => {
|
|
|
20
20
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
21
21
|
children: /*#__PURE__*/_jsxs(Component, {
|
|
22
22
|
...restProps,
|
|
23
|
-
className: clsx(
|
|
24
|
-
['button_grouped_' + group]: group
|
|
23
|
+
className: clsx(css.button, css['button_' + size], css['button_' + variant], css['button_' + color], className, {
|
|
24
|
+
[css['button_grouped_' + group]]: group
|
|
25
25
|
}),
|
|
26
26
|
children: [startAdornment && /*#__PURE__*/_jsx("div", {
|
|
27
|
-
className: clsx(
|
|
27
|
+
className: clsx(css.button__adornment, css.button__adornment_start),
|
|
28
28
|
children: startAdornment
|
|
29
29
|
}), /*#__PURE__*/_jsx("div", {
|
|
30
30
|
children: children
|
|
31
31
|
}), endAdornment && /*#__PURE__*/_jsx("div", {
|
|
32
|
-
className: clsx(
|
|
32
|
+
className: clsx(css.button__adornment, css.button__adornment_end),
|
|
33
33
|
children: endAdornment
|
|
34
34
|
})]
|
|
35
35
|
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import css from './Card.module.scss';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
5
|
+
const Card = props => {
|
|
6
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
7
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
8
|
+
...props,
|
|
9
|
+
className: clsx(css.card, props.className)
|
|
10
|
+
})
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
export default Card;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ElementType, HTMLAttributes } from 'react';
|
|
2
|
+
import { ColorType, SizeType, VariantType } from '../shared/types/theme';
|
|
3
|
+
export type ChipProps<T extends ElementType = ElementType<HTMLAttributes<HTMLSpanElement>>> = Omit<ComponentPropsWithoutRef<T>, 'color'> & {
|
|
4
|
+
size?: Exclude<SizeType, 'large' | 'extraLarge'>;
|
|
5
|
+
color?: ColorType;
|
|
6
|
+
text?: string;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
icon?: string;
|
|
9
|
+
variant?: Exclude<VariantType, 'transparent'>;
|
|
10
|
+
as?: T;
|
|
11
|
+
};
|
|
12
|
+
declare function Chip<T extends ElementType>(props: ChipProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default Chip;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import css from './Chip.module.scss';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
+
function Chip(props) {
|
|
7
|
+
let {
|
|
8
|
+
size,
|
|
9
|
+
text,
|
|
10
|
+
icon,
|
|
11
|
+
onClose,
|
|
12
|
+
as,
|
|
13
|
+
variant,
|
|
14
|
+
color,
|
|
15
|
+
children
|
|
16
|
+
} = props;
|
|
17
|
+
let Component = as || 'span';
|
|
18
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
19
|
+
children: /*#__PURE__*/_jsx(Component, {
|
|
20
|
+
className: clsx(css.chip, css['chip_' + size], css['chip_' + variant], css['chip_' + color]),
|
|
21
|
+
children: /*#__PURE__*/_jsxs("span", {
|
|
22
|
+
className: css.chip__inner,
|
|
23
|
+
children: [icon && /*#__PURE__*/_jsx("span", {
|
|
24
|
+
className: clsx('material_icon', css.chip__icon, css['chip__icon_' + size]),
|
|
25
|
+
children: icon
|
|
26
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
27
|
+
children: text || children
|
|
28
|
+
}), onClose && /*#__PURE__*/_jsx("span", {
|
|
29
|
+
className: clsx('material_icon_solid', css['chip__close_' + size], css['chip__close_' + color], css.chip__close),
|
|
30
|
+
children: "cancel"
|
|
31
|
+
})]
|
|
32
|
+
})
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
export default Chip;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
@import "../assets/styles";
|
|
2
|
+
|
|
3
|
+
.chip{
|
|
4
|
+
background: $color-gray-200;
|
|
5
|
+
padding: calc($size-step / 1.5) calc($size-step * 1.5);
|
|
6
|
+
border-radius: 20px;
|
|
7
|
+
font-size: 13px;
|
|
8
|
+
display: inline-block;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.chip__inner{
|
|
12
|
+
@include flex(center)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.chip__icon{
|
|
16
|
+
display: inline-block;
|
|
17
|
+
margin-right: $size-step;
|
|
18
|
+
margin-left: -$size-step;
|
|
19
|
+
font-size: 22px;
|
|
20
|
+
@include flex();
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
}
|
|
23
|
+
.chip__close{
|
|
24
|
+
margin-left: $size-step;
|
|
25
|
+
margin-right: -$size-step;
|
|
26
|
+
padding: 0;
|
|
27
|
+
font-size: 20px;
|
|
28
|
+
color: $color-gray-500;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
&:hover{
|
|
31
|
+
@include transition();
|
|
32
|
+
color: $color-gray-600;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.chip__close_primary,
|
|
37
|
+
.chip__close_secondary{
|
|
38
|
+
color: #fff;
|
|
39
|
+
&:hover{
|
|
40
|
+
color: #fff;
|
|
41
|
+
opacity: 0.6;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.chip_small{
|
|
46
|
+
padding: 4px $size-step;
|
|
47
|
+
}
|
|
48
|
+
.chip__icon_small{
|
|
49
|
+
font-size: 18px;
|
|
50
|
+
margin-left: 0;
|
|
51
|
+
}
|
|
52
|
+
.chip__close_small{
|
|
53
|
+
font-size: 15px;
|
|
54
|
+
margin-right: -2px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.chip_outlined{
|
|
58
|
+
background: transparent;
|
|
59
|
+
border: 1px solid $color-gray-400;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
a.chip,
|
|
63
|
+
button.chip{
|
|
64
|
+
&:hover{
|
|
65
|
+
background: $color-gray-300;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
a.chip_outlined,
|
|
69
|
+
button.chip_outlined{
|
|
70
|
+
&:hover{
|
|
71
|
+
background: rgba($color-neutral, 0.1);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.chip_secondary{
|
|
76
|
+
color: #fff;
|
|
77
|
+
background-color: $color-secondary;
|
|
78
|
+
}
|
|
79
|
+
a.chip_secondary,
|
|
80
|
+
button.chip_secondary{
|
|
81
|
+
&:hover{
|
|
82
|
+
background-color: $color-secondary-dark;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.chip_primary{
|
|
87
|
+
color: #fff;
|
|
88
|
+
background-color: $color-primary;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
a.chip_primary,
|
|
92
|
+
button.chip_primary{
|
|
93
|
+
&:hover{
|
|
94
|
+
background-color: $color-primary-dark;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { ColorType, SizeType, VariantType } from '../../shared/types/theme';
|
|
3
|
+
type BaseCheckboxPropsType = {
|
|
4
|
+
label?: string | ReactNode;
|
|
5
|
+
size?: Exclude<SizeType, 'extraLarge'>;
|
|
6
|
+
color?: ColorType;
|
|
7
|
+
variant?: Exclude<VariantType, 'transparent'>;
|
|
8
|
+
intermediate?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type CheckboxPropsType = BaseCheckboxPropsType & Omit<InputHTMLAttributes<any>, 'size'>;
|
|
11
|
+
declare const Checkbox: (props: CheckboxPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default Checkbox;
|