armtek-uikit-react 1.0.15 → 1.0.16
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/cjs/index.js +35 -0
- package/cjs/lib/const/styles.js +6 -0
- package/cjs/lib/helpers/helpers.js +56 -0
- package/cjs/lib/hooks/useClickOutside.js +22 -0
- package/cjs/lib/services/DateService.js +48 -0
- package/cjs/types/theme.js +3 -0
- package/cjs/ui/Adornment/Adornment.js +51 -0
- package/cjs/ui/Alert/Alert.js +50 -0
- package/cjs/ui/Avatar/Avatar.js +54 -0
- package/cjs/ui/Avatar/AvatarGroup.js +38 -0
- package/cjs/ui/Badge/Badge.js +38 -0
- package/cjs/ui/Button/index.js +47 -0
- package/cjs/ui/ButtonGroup/index.js +30 -0
- package/cjs/ui/ButtonIcon/index.js +25 -0
- package/cjs/ui/Card/Card.js +23 -0
- package/cjs/ui/Chip/Chip.js +45 -0
- package/cjs/ui/Form/Checkbox/Checkbox.js +57 -0
- package/cjs/ui/Form/Checkbox/Radio.js +25 -0
- package/cjs/ui/Form/DateField/DateField.js +70 -0
- package/cjs/ui/Form/DateField/TimeField.js +19 -0
- package/cjs/ui/Form/DatePicker/DatePicker.js +51 -0
- package/cjs/ui/Form/DatePicker/PeriodSelect.js +29 -0
- package/cjs/ui/Form/DatePicker/TimePicker.js +28 -0
- package/cjs/ui/Form/Interval/Interval.js +102 -0
- package/cjs/ui/Form/Interval/IntervalSlide.js +52 -0
- package/cjs/ui/Form/Password/Password.js +46 -0
- package/cjs/ui/Form/Period/Period.js +73 -0
- package/cjs/ui/Form/Rating/Rating.js +58 -0
- package/cjs/ui/Form/Select/Select.js +143 -0
- package/cjs/ui/Form/Switch/Switch.js +34 -0
- package/cjs/ui/Form/TextArea/TextArea.js +50 -0
- package/cjs/ui/Form/TextField/TextField.js +156 -0
- package/cjs/ui/HelperText/HelperText.js +32 -0
- package/cjs/ui/List/ListItem.js +64 -0
- package/cjs/ui/Loader/Loader.js +124 -0
- package/cjs/ui/Logo/Logo.js +106 -0
- package/cjs/ui/Slider/RcSlider.js +1 -0
- package/cjs/ui/Slider/Slider.js +39 -0
- package/cjs/ui/Status/Status.js +35 -0
- package/cjs/ui/Stepper/StepItem.js +60 -0
- package/cjs/ui/Stepper/StepItemIcon.js +44 -0
- package/cjs/ui/Stepper/Stepper.js +49 -0
- package/cjs/ui/Tooltip/Tooltip.js +36 -0
- package/dist/armtek-uikit-react-main.js +1357 -0
- package/dist/armtek-uikit-react-main.min.js +2 -0
- package/dist/armtek-uikit-react-main.min.js.LICENSE.txt +15 -0
- package/dist/css/main.css +19 -0
- package/esm/assets/Adornment.scss +18 -0
- package/esm/assets/Alert.scss +38 -0
- package/esm/assets/Avatar.scss +82 -0
- package/esm/assets/AvatarGroup.scss +48 -0
- package/esm/assets/Badge.scss +83 -0
- package/esm/assets/Button.scss +266 -0
- package/esm/assets/ButtonGroup.scss +12 -0
- package/esm/assets/ButtonIcon.scss +24 -0
- package/esm/assets/Card.scss +7 -0
- package/esm/assets/Checkbox.scss +297 -0
- package/esm/assets/Chip.scss +96 -0
- package/esm/assets/DatePicker.scss +7 -0
- package/esm/assets/HelperText.scss +10 -0
- package/esm/assets/Interval.scss +35 -0
- package/esm/assets/ListItem.scss +34 -0
- package/esm/assets/Loader.scss +37 -0
- package/esm/assets/Logo.scss +29 -0
- package/esm/assets/Period.scss +10 -0
- package/esm/assets/Rating.scss +19 -0
- package/esm/assets/Select.scss +26 -0
- package/esm/assets/Slider.scss +6 -0
- package/esm/assets/Status.scss +45 -0
- package/esm/assets/StepItem.scss +67 -0
- package/esm/assets/StepItemIcon.scss +47 -0
- package/esm/assets/Stepper.scss +34 -0
- package/esm/assets/Switch.scss +69 -0
- package/esm/assets/TextArea.scss +15 -0
- package/esm/assets/TextField.scss +160 -0
- package/esm/assets/Tooltip.scss +18 -0
- package/esm/assets/fonts.scss +2 -0
- package/esm/assets/global.css +72 -0
- package/esm/assets/styles.scss +31 -0
- package/esm/assets/variables.scss +67 -0
- package/esm/index.d.ts +29 -0
- package/esm/lib/const/styles.d.ts +1 -0
- package/esm/lib/helpers/helpers.d.ts +6 -0
- package/esm/lib/hooks/useClickOutside.d.ts +3 -0
- package/esm/lib/services/DateService.d.ts +12 -0
- package/esm/types/theme.d.ts +10 -0
- package/esm/ui/Adornment/Adornment.d.ts +7 -0
- package/esm/ui/Adornment/Adornment.module.scss +2 -0
- package/esm/ui/Alert/Alert.d.ts +10 -0
- package/esm/ui/Alert/Alert.module.scss +2 -0
- package/esm/ui/Avatar/Avatar.d.ts +13 -0
- package/esm/ui/Avatar/Avatar.module.scss +1 -0
- package/esm/ui/Avatar/AvatarGroup.d.ts +8 -0
- package/esm/ui/Avatar/AvatarGroup.module.scss +1 -0
- package/esm/ui/Badge/Badge.d.ts +11 -0
- package/esm/ui/Badge/Badge.module.scss +1 -0
- package/esm/ui/Button/Button.module.scss +1 -0
- package/esm/ui/Button/index.d.ts +15 -0
- package/esm/ui/ButtonGroup/ButtonGroup.module.scss +2 -0
- package/esm/ui/ButtonGroup/index.d.ts +6 -0
- package/esm/ui/ButtonIcon/ButtonIcon.module.scss +1 -0
- package/esm/ui/ButtonIcon/index.d.ts +3 -0
- package/esm/ui/Card/Card.d.ts +4 -0
- package/esm/ui/Card/Card.module.scss +1 -0
- package/esm/ui/Chip/Chip.d.ts +13 -0
- package/esm/ui/Chip/Chip.module.scss +1 -0
- package/esm/ui/Form/Checkbox/Checkbox.d.ts +12 -0
- package/esm/ui/Form/Checkbox/Checkbox.module.scss +1 -0
- package/esm/ui/Form/Checkbox/Radio.d.ts +3 -0
- package/esm/ui/Form/DateField/DateField.d.ts +26 -0
- package/esm/ui/Form/DateField/DateField.module.scss +1 -0
- package/esm/ui/Form/DateField/TimeField.d.ts +3 -0
- package/esm/ui/Form/DatePicker/DatePicker.d.ts +7 -0
- package/esm/ui/Form/DatePicker/DatePicker.module.scss +1 -0
- package/esm/ui/Form/DatePicker/PeriodSelect.d.ts +2 -0
- package/esm/ui/Form/DatePicker/TimePicker.d.ts +2 -0
- package/esm/ui/Form/DatePicker/styles.css +766 -0
- package/esm/ui/Form/Interval/Interval.d.ts +21 -0
- package/esm/ui/Form/Interval/Interval.module.scss +1 -0
- package/esm/ui/Form/Interval/IntervalSlide.d.ts +4 -0
- package/esm/ui/Form/Password/Password.d.ts +12 -0
- package/esm/ui/Form/Period/Period.d.ts +15 -0
- package/esm/ui/Form/Period/Period.module.scss +2 -0
- package/esm/ui/Form/Rating/Rating.d.ts +10 -0
- package/esm/ui/Form/Rating/Rating.module.scss +1 -0
- package/esm/ui/Form/Select/Select.d.ts +23 -0
- package/esm/ui/Form/Select/Select.module.scss +1 -0
- package/esm/ui/Form/Switch/Switch.d.ts +7 -0
- package/esm/ui/Form/Switch/Switch.module.scss +1 -0
- package/esm/ui/Form/TextArea/TextArea.d.ts +4 -0
- package/esm/ui/Form/TextArea/TextArea.module.scss +1 -0
- package/esm/ui/Form/TextField/TextField.d.ts +40 -0
- package/esm/ui/Form/TextField/TextField.module.scss +1 -0
- package/esm/ui/HelperText/HelperText.d.ts +6 -0
- package/esm/ui/HelperText/HelperText.module.scss +1 -0
- package/esm/ui/List/ListItem.d.ts +10 -0
- package/esm/ui/List/ListItem.module.scss +1 -0
- package/esm/ui/Loader/Loader.d.ts +6 -0
- package/esm/ui/Loader/Loader.module.scss +1 -0
- package/esm/ui/Logo/Logo.d.ts +12 -0
- package/esm/ui/Logo/Logo.module.scss +1 -0
- package/esm/ui/Slider/RcSlider.js +0 -0
- package/esm/ui/Slider/Slider.d.ts +8 -0
- package/esm/ui/Slider/Slider.module.scss +1 -0
- package/esm/ui/Slider/style.css +281 -0
- package/esm/ui/Status/Status.d.ts +10 -0
- package/esm/ui/Status/Status.module.scss +1 -0
- package/esm/ui/Stepper/StepItem.d.ts +14 -0
- package/esm/ui/Stepper/StepItem.module.scss +1 -0
- package/esm/ui/Stepper/StepItemIcon.d.ts +11 -0
- package/esm/ui/Stepper/StepItemIcon.module.scss +1 -0
- package/esm/ui/Stepper/Stepper.d.ts +11 -0
- package/esm/ui/Stepper/Stepper.module.scss +1 -0
- package/esm/ui/Tooltip/Tooltip.d.ts +7 -0
- package/esm/ui/Tooltip/Tooltip.module.scss +1 -0
- package/package.json +1 -25
- /package/{assets → cjs/assets}/Adornment.scss +0 -0
- /package/{assets → cjs/assets}/Alert.scss +0 -0
- /package/{assets → cjs/assets}/Avatar.scss +0 -0
- /package/{assets → cjs/assets}/AvatarGroup.scss +0 -0
- /package/{assets → cjs/assets}/Badge.scss +0 -0
- /package/{assets → cjs/assets}/Button.scss +0 -0
- /package/{assets → cjs/assets}/ButtonGroup.scss +0 -0
- /package/{assets → cjs/assets}/ButtonIcon.scss +0 -0
- /package/{assets → cjs/assets}/Card.scss +0 -0
- /package/{assets → cjs/assets}/Checkbox.scss +0 -0
- /package/{assets → cjs/assets}/Chip.scss +0 -0
- /package/{assets → cjs/assets}/DatePicker.scss +0 -0
- /package/{assets → cjs/assets}/HelperText.scss +0 -0
- /package/{assets → cjs/assets}/Interval.scss +0 -0
- /package/{assets → cjs/assets}/ListItem.scss +0 -0
- /package/{assets → cjs/assets}/Loader.scss +0 -0
- /package/{assets → cjs/assets}/Logo.scss +0 -0
- /package/{assets → cjs/assets}/Period.scss +0 -0
- /package/{assets → cjs/assets}/Rating.scss +0 -0
- /package/{assets → cjs/assets}/Select.scss +0 -0
- /package/{assets → cjs/assets}/Slider.scss +0 -0
- /package/{assets → cjs/assets}/Status.scss +0 -0
- /package/{assets → cjs/assets}/StepItem.scss +0 -0
- /package/{assets → cjs/assets}/StepItemIcon.scss +0 -0
- /package/{assets → cjs/assets}/Stepper.scss +0 -0
- /package/{assets → cjs/assets}/Switch.scss +0 -0
- /package/{assets → cjs/assets}/TextArea.scss +0 -0
- /package/{assets → cjs/assets}/TextField.scss +0 -0
- /package/{assets → cjs/assets}/Tooltip.scss +0 -0
- /package/{assets → cjs/assets}/fonts.scss +0 -0
- /package/{assets → cjs/assets}/global.css +0 -0
- /package/{assets → cjs/assets}/styles.scss +0 -0
- /package/{assets → cjs/assets}/variables.scss +0 -0
- /package/{types → cjs}/index.d.ts +0 -0
- /package/{types → cjs}/lib/const/styles.d.ts +0 -0
- /package/{types → cjs}/lib/helpers/helpers.d.ts +0 -0
- /package/{types → cjs}/lib/hooks/useClickOutside.d.ts +0 -0
- /package/{types → cjs}/lib/services/DateService.d.ts +0 -0
- /package/{types → cjs}/types/theme.d.ts +0 -0
- /package/{types → cjs}/ui/Adornment/Adornment.d.ts +0 -0
- /package/{ui → cjs/ui}/Adornment/Adornment.module.scss +0 -0
- /package/{types → cjs}/ui/Alert/Alert.d.ts +0 -0
- /package/{ui → cjs/ui}/Alert/Alert.module.scss +0 -0
- /package/{types → cjs}/ui/Avatar/Avatar.d.ts +0 -0
- /package/{ui → cjs/ui}/Avatar/Avatar.module.scss +0 -0
- /package/{types → cjs}/ui/Avatar/AvatarGroup.d.ts +0 -0
- /package/{ui → cjs/ui}/Avatar/AvatarGroup.module.scss +0 -0
- /package/{types → cjs}/ui/Badge/Badge.d.ts +0 -0
- /package/{ui → cjs/ui}/Badge/Badge.module.scss +0 -0
- /package/{ui → cjs/ui}/Button/Button.module.scss +0 -0
- /package/{types → cjs}/ui/Button/index.d.ts +0 -0
- /package/{ui → cjs/ui}/ButtonGroup/ButtonGroup.module.scss +0 -0
- /package/{types → cjs}/ui/ButtonGroup/index.d.ts +0 -0
- /package/{ui → cjs/ui}/ButtonIcon/ButtonIcon.module.scss +0 -0
- /package/{types → cjs}/ui/ButtonIcon/index.d.ts +0 -0
- /package/{types → cjs}/ui/Card/Card.d.ts +0 -0
- /package/{ui → cjs/ui}/Card/Card.module.scss +0 -0
- /package/{types → cjs}/ui/Chip/Chip.d.ts +0 -0
- /package/{ui → cjs/ui}/Chip/Chip.module.scss +0 -0
- /package/{types → cjs}/ui/Form/Checkbox/Checkbox.d.ts +0 -0
- /package/{ui → cjs/ui}/Form/Checkbox/Checkbox.module.scss +0 -0
- /package/{types → cjs}/ui/Form/Checkbox/Radio.d.ts +0 -0
- /package/{types → cjs}/ui/Form/DateField/DateField.d.ts +0 -0
- /package/{ui → cjs/ui}/Form/DateField/DateField.module.scss +0 -0
- /package/{types → cjs}/ui/Form/DateField/TimeField.d.ts +0 -0
- /package/{types → cjs}/ui/Form/DatePicker/DatePicker.d.ts +0 -0
- /package/{ui → cjs/ui}/Form/DatePicker/DatePicker.module.scss +0 -0
- /package/{types → cjs}/ui/Form/DatePicker/PeriodSelect.d.ts +0 -0
- /package/{types → cjs}/ui/Form/DatePicker/TimePicker.d.ts +0 -0
- /package/{ui → cjs/ui}/Form/DatePicker/styles.css +0 -0
- /package/{types → cjs}/ui/Form/Interval/Interval.d.ts +0 -0
- /package/{ui → cjs/ui}/Form/Interval/Interval.module.scss +0 -0
- /package/{types → cjs}/ui/Form/Interval/IntervalSlide.d.ts +0 -0
- /package/{types → cjs}/ui/Form/Password/Password.d.ts +0 -0
- /package/{types → cjs}/ui/Form/Period/Period.d.ts +0 -0
- /package/{ui → cjs/ui}/Form/Period/Period.module.scss +0 -0
- /package/{types → cjs}/ui/Form/Rating/Rating.d.ts +0 -0
- /package/{ui → cjs/ui}/Form/Rating/Rating.module.scss +0 -0
- /package/{types → cjs}/ui/Form/Select/Select.d.ts +0 -0
- /package/{ui → cjs/ui}/Form/Select/Select.module.scss +0 -0
- /package/{types → cjs}/ui/Form/Switch/Switch.d.ts +0 -0
- /package/{ui → cjs/ui}/Form/Switch/Switch.module.scss +0 -0
- /package/{types → cjs}/ui/Form/TextArea/TextArea.d.ts +0 -0
- /package/{ui → cjs/ui}/Form/TextArea/TextArea.module.scss +0 -0
- /package/{types → cjs}/ui/Form/TextField/TextField.d.ts +0 -0
- /package/{ui → cjs/ui}/Form/TextField/TextField.module.scss +0 -0
- /package/{types → cjs}/ui/HelperText/HelperText.d.ts +0 -0
- /package/{ui → cjs/ui}/HelperText/HelperText.module.scss +0 -0
- /package/{types → cjs}/ui/List/ListItem.d.ts +0 -0
- /package/{ui → cjs/ui}/List/ListItem.module.scss +0 -0
- /package/{types → cjs}/ui/Loader/Loader.d.ts +0 -0
- /package/{ui → cjs/ui}/Loader/Loader.module.scss +0 -0
- /package/{types → cjs}/ui/Logo/Logo.d.ts +0 -0
- /package/{ui → cjs/ui}/Logo/Logo.module.scss +0 -0
- /package/{types → cjs}/ui/Slider/RcSlider.d.ts +0 -0
- /package/{types → cjs}/ui/Slider/Slider.d.ts +0 -0
- /package/{ui → cjs/ui}/Slider/Slider.module.scss +0 -0
- /package/{ui → cjs/ui}/Slider/style.css +0 -0
- /package/{types → cjs}/ui/Status/Status.d.ts +0 -0
- /package/{ui → cjs/ui}/Status/Status.module.scss +0 -0
- /package/{types → cjs}/ui/Stepper/StepItem.d.ts +0 -0
- /package/{ui → cjs/ui}/Stepper/StepItem.module.scss +0 -0
- /package/{types → cjs}/ui/Stepper/StepItemIcon.d.ts +0 -0
- /package/{ui → cjs/ui}/Stepper/StepItemIcon.module.scss +0 -0
- /package/{types → cjs}/ui/Stepper/Stepper.d.ts +0 -0
- /package/{ui → cjs/ui}/Stepper/Stepper.module.scss +0 -0
- /package/{types → cjs}/ui/Tooltip/Tooltip.d.ts +0 -0
- /package/{ui → cjs/ui}/Tooltip/Tooltip.module.scss +0 -0
- /package/{index.js → esm/index.js} +0 -0
- /package/{lib → esm/lib}/const/styles.js +0 -0
- /package/{lib → esm/lib}/helpers/helpers.js +0 -0
- /package/{lib → esm/lib}/hooks/useClickOutside.js +0 -0
- /package/{lib → esm/lib}/services/DateService.js +0 -0
- /package/{types → esm/types}/theme.js +0 -0
- /package/{ui → esm/ui}/Adornment/Adornment.js +0 -0
- /package/{ui → esm/ui}/Alert/Alert.js +0 -0
- /package/{ui → esm/ui}/Avatar/Avatar.js +0 -0
- /package/{ui → esm/ui}/Avatar/AvatarGroup.js +0 -0
- /package/{ui → esm/ui}/Badge/Badge.js +0 -0
- /package/{ui → esm/ui}/Button/index.js +0 -0
- /package/{ui → esm/ui}/ButtonGroup/index.js +0 -0
- /package/{ui → esm/ui}/ButtonIcon/index.js +0 -0
- /package/{ui → esm/ui}/Card/Card.js +0 -0
- /package/{ui → esm/ui}/Chip/Chip.js +0 -0
- /package/{ui → esm/ui}/Form/Checkbox/Checkbox.js +0 -0
- /package/{ui → esm/ui}/Form/Checkbox/Radio.js +0 -0
- /package/{ui → esm/ui}/Form/DateField/DateField.js +0 -0
- /package/{ui → esm/ui}/Form/DateField/TimeField.js +0 -0
- /package/{ui → esm/ui}/Form/DatePicker/DatePicker.js +0 -0
- /package/{ui → esm/ui}/Form/DatePicker/PeriodSelect.js +0 -0
- /package/{ui → esm/ui}/Form/DatePicker/TimePicker.js +0 -0
- /package/{ui → esm/ui}/Form/Interval/Interval.js +0 -0
- /package/{ui → esm/ui}/Form/Interval/IntervalSlide.js +0 -0
- /package/{ui → esm/ui}/Form/Password/Password.js +0 -0
- /package/{ui → esm/ui}/Form/Period/Period.js +0 -0
- /package/{ui → esm/ui}/Form/Rating/Rating.js +0 -0
- /package/{ui → esm/ui}/Form/Select/Select.js +0 -0
- /package/{ui → esm/ui}/Form/Switch/Switch.js +0 -0
- /package/{ui → esm/ui}/Form/TextArea/TextArea.js +0 -0
- /package/{ui → esm/ui}/Form/TextField/TextField.js +0 -0
- /package/{ui → esm/ui}/HelperText/HelperText.js +0 -0
- /package/{ui → esm/ui}/List/ListItem.js +0 -0
- /package/{ui → esm/ui}/Loader/Loader.js +0 -0
- /package/{ui → esm/ui}/Logo/Logo.js +0 -0
- /package/{ui/Slider/RcSlider.js → esm/ui/Slider/RcSlider.d.ts} +0 -0
- /package/{ui → esm/ui}/Slider/Slider.js +0 -0
- /package/{ui → esm/ui}/Status/Status.js +0 -0
- /package/{ui → esm/ui}/Stepper/StepItem.js +0 -0
- /package/{ui → esm/ui}/Stepper/StepItemIcon.js +0 -0
- /package/{ui → esm/ui}/Stepper/Stepper.js +0 -0
- /package/{ui → esm/ui}/Tooltip/Tooltip.js +0 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.getOptionValue = exports.default = void 0;
|
|
7
|
+
var _TextField = _interopRequireDefault(require("../TextField/TextField"));
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _ButtonIcon = _interopRequireDefault(require("../../ButtonIcon"));
|
|
10
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
11
|
+
var _ListItem = _interopRequireDefault(require("../../List/ListItem"));
|
|
12
|
+
var _useClickOutside = _interopRequireDefault(require("../../../lib/hooks/useClickOutside"));
|
|
13
|
+
var _SelectModule = _interopRequireDefault(require("./Select.module.scss"));
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
const CssClasses = ['select', 'select__input_wrapper', 'select__input', 'options', 'options_inline'];
|
|
16
|
+
|
|
17
|
+
// const css = getCssPrefix(CssClasses)
|
|
18
|
+
|
|
19
|
+
const getOptionValue = option => option.value || option.text;
|
|
20
|
+
exports.getOptionValue = getOptionValue;
|
|
21
|
+
function Select(props) {
|
|
22
|
+
var _options$find;
|
|
23
|
+
let {
|
|
24
|
+
options,
|
|
25
|
+
endAdornment,
|
|
26
|
+
className,
|
|
27
|
+
inline,
|
|
28
|
+
multiple = false,
|
|
29
|
+
value,
|
|
30
|
+
defaultValue,
|
|
31
|
+
onChange,
|
|
32
|
+
...inputProps
|
|
33
|
+
} = props;
|
|
34
|
+
let [active, setActive] = (0, _react.useState)(false);
|
|
35
|
+
let [selected, setSelected] = (0, _react.useState)(defaultValue || (multiple ? [] : ''));
|
|
36
|
+
let selectRef = (0, _react.useRef)(null);
|
|
37
|
+
let optRef = (0, _useClickOutside.default)(() => setActive(false));
|
|
38
|
+
const handleActive = flag => {
|
|
39
|
+
setActive(prev => flag !== undefined ? flag : !prev);
|
|
40
|
+
};
|
|
41
|
+
const handleSelect = option => {
|
|
42
|
+
let v = getOptionValue(option);
|
|
43
|
+
let mSelected = selected;
|
|
44
|
+
let newValueS = v;
|
|
45
|
+
let newValueM = mSelected.includes(v) ? mSelected.filter(item => item !== v) : mSelected.concat(v);
|
|
46
|
+
setSelected(multiple ? newValueM : newValueS);
|
|
47
|
+
if (onChange) onChange(multiple ? newValueM : newValueS);
|
|
48
|
+
if (!multiple) setActive(false);
|
|
49
|
+
|
|
50
|
+
// if(selectRef.current)
|
|
51
|
+
// selectRef.current.dispatchEvent(new Event('change', { bubbles: true }))
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// const handleChange = (e: ChangeEvent<HTMLSelectElement>) => {
|
|
55
|
+
// let option = options.find(item => getOptionValue(item) === e.target.value)
|
|
56
|
+
// if( option )
|
|
57
|
+
// {
|
|
58
|
+
// let v = getOptionValue(option)
|
|
59
|
+
// setSelected(!multiple ? v : prev => prev?.concat(v) || [v])
|
|
60
|
+
// if( !multiple )
|
|
61
|
+
// setActive(false)
|
|
62
|
+
// }
|
|
63
|
+
// }
|
|
64
|
+
|
|
65
|
+
let selectEndAdornment = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
66
|
+
children: [endAdornment, /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonIcon.default, {
|
|
67
|
+
onClick: () => handleActive,
|
|
68
|
+
size: 'small',
|
|
69
|
+
variant: 'transparent',
|
|
70
|
+
className: 'material_icon',
|
|
71
|
+
children: "arrow_drop_down"
|
|
72
|
+
})]
|
|
73
|
+
});
|
|
74
|
+
let selectProps = {};
|
|
75
|
+
// if( value !== undefined )
|
|
76
|
+
// {
|
|
77
|
+
// selectProps.value = value
|
|
78
|
+
// selectProps.onChange = handleChange
|
|
79
|
+
// }
|
|
80
|
+
|
|
81
|
+
let realValue = value !== undefined ? value : selected;
|
|
82
|
+
let selectedText = multiple ? options.filter(item => realValue == null ? void 0 : realValue.includes(getOptionValue(item))).map(item => item.text).join(', ') : ((_options$find = options.find(item => getOptionValue(item) === realValue)) == null ? void 0 : _options$find.text) || '';
|
|
83
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
84
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
85
|
+
className: _SelectModule.default.select,
|
|
86
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
87
|
+
className: _SelectModule.default.select__input_wrapper,
|
|
88
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("select", {
|
|
89
|
+
multiple: multiple,
|
|
90
|
+
ref: selectRef,
|
|
91
|
+
...selectProps,
|
|
92
|
+
style: {
|
|
93
|
+
display: 'none'
|
|
94
|
+
},
|
|
95
|
+
children: options.map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
|
|
96
|
+
children: item.text
|
|
97
|
+
}, item.text))
|
|
98
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, {
|
|
99
|
+
...inputProps,
|
|
100
|
+
value: selectedText,
|
|
101
|
+
onClick: () => setActive(true),
|
|
102
|
+
className: (0, _clsx.default)(_SelectModule.default.select__input, className),
|
|
103
|
+
endAdornment: selectEndAdornment
|
|
104
|
+
})]
|
|
105
|
+
}), active && /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectOptions, {
|
|
106
|
+
ref: optRef,
|
|
107
|
+
options: options,
|
|
108
|
+
multiple: multiple,
|
|
109
|
+
value: realValue,
|
|
110
|
+
inline: inline,
|
|
111
|
+
onClick: handleSelect
|
|
112
|
+
})]
|
|
113
|
+
})
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
const SelectOptions = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
117
|
+
let {
|
|
118
|
+
options,
|
|
119
|
+
value,
|
|
120
|
+
multiple,
|
|
121
|
+
inline,
|
|
122
|
+
onClick
|
|
123
|
+
} = props;
|
|
124
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
125
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
126
|
+
ref: ref,
|
|
127
|
+
className: (0, _clsx.default)(_SelectModule.default.options, {
|
|
128
|
+
[_SelectModule.default.options_inline]: !!inline
|
|
129
|
+
}),
|
|
130
|
+
children: options.map((item, index) => {
|
|
131
|
+
let optValue = getOptionValue(item);
|
|
132
|
+
let active = multiple === true && value ? value.includes(optValue) : optValue === value;
|
|
133
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItem.default, {
|
|
134
|
+
active: active,
|
|
135
|
+
onClick: () => onClick(item),
|
|
136
|
+
children: item.text
|
|
137
|
+
}, index);
|
|
138
|
+
})
|
|
139
|
+
})
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
var _default = Select;
|
|
143
|
+
exports.default = _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
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 _SwitchModule = _interopRequireDefault(require("./Switch.module.scss"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const CssClasses = ['switch', 'switch__input', 'switch__slider', 'switch_small'];
|
|
10
|
+
|
|
11
|
+
// const css = getCssPrefix(CssClasses)
|
|
12
|
+
|
|
13
|
+
const Switch = props => {
|
|
14
|
+
let {
|
|
15
|
+
onChange,
|
|
16
|
+
size,
|
|
17
|
+
...restProps
|
|
18
|
+
} = props;
|
|
19
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
20
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
|
|
21
|
+
className: (0, _clsx.default)(_SwitchModule.default.switch, _SwitchModule.default['switch_' + props.size]),
|
|
22
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
23
|
+
className: _SwitchModule.default.switch__input,
|
|
24
|
+
...restProps,
|
|
25
|
+
type: "checkbox"
|
|
26
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
27
|
+
className: _SwitchModule.default.switch__slider
|
|
28
|
+
})]
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
var _default = Switch;
|
|
33
|
+
exports.default = _default;
|
|
34
|
+
module.exports = exports.default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _TextField = _interopRequireDefault(require("../TextField/TextField"));
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
10
|
+
var _TextAreaModule = _interopRequireDefault(require("./TextArea.module.scss"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
const CssClasses = ['textarea', 'size_small'];
|
|
13
|
+
|
|
14
|
+
// const css = getCssPrefix(CssClasses)
|
|
15
|
+
|
|
16
|
+
const TextArea = props => {
|
|
17
|
+
var _textareaRef$current, _textareaRef$current2;
|
|
18
|
+
let {
|
|
19
|
+
onChange,
|
|
20
|
+
className,
|
|
21
|
+
...restProps
|
|
22
|
+
} = props;
|
|
23
|
+
let [value, setValue] = (0, _react.useState)('');
|
|
24
|
+
let [minHeight, setMinHeight] = (0, _react.useState)(0);
|
|
25
|
+
let textareaRef = (0, _react.useRef)();
|
|
26
|
+
const handleChange = e => {
|
|
27
|
+
setValue(e.target.value);
|
|
28
|
+
if (onChange) onChange(e);
|
|
29
|
+
};
|
|
30
|
+
(0, _react.useEffect)(() => {
|
|
31
|
+
if (textareaRef.current) setMinHeight(textareaRef.current.clientHeight);
|
|
32
|
+
}, [textareaRef]);
|
|
33
|
+
let textHeight = (((_textareaRef$current = textareaRef.current) == null ? void 0 : _textareaRef$current.scrollHeight) || 0) < minHeight ? minHeight : (_textareaRef$current2 = textareaRef.current) == null ? void 0 : _textareaRef$current2.scrollHeight;
|
|
34
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
35
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, {
|
|
36
|
+
ref: textareaRef,
|
|
37
|
+
value: value,
|
|
38
|
+
...restProps,
|
|
39
|
+
className: (0, _clsx.default)(_TextAreaModule.default.textarea, _TextAreaModule.default['size_' + restProps.size], className),
|
|
40
|
+
onChange: handleChange,
|
|
41
|
+
multiline: true,
|
|
42
|
+
style: {
|
|
43
|
+
height: textHeight + 'px'
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
var _default = TextArea;
|
|
49
|
+
exports.default = _default;
|
|
50
|
+
module.exports = exports.default;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = exports.TextFieldInput = exports.TextFieldContainer = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
9
|
+
var _HelperText = _interopRequireDefault(require("../../HelperText/HelperText"));
|
|
10
|
+
var _TextFieldModule = _interopRequireDefault(require("./TextField.module.scss"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
const CssClasses = ['textfield__container_outlined', 'textfield__container', 'textfield', 'textfield_outlined', '_focused', '_disabled', '_error', '_label', 'textfield__label_focused', 'textfield__label_small', 'textfield__label_error', 'textfield__label', 'textfield__input', 'textfield__input_outlined', 'size_small', 'textfield__adornment', 'textfield__helperText', 'textfield__icon'];
|
|
13
|
+
|
|
14
|
+
// const css = getCssPrefix(CssClasses)
|
|
15
|
+
|
|
16
|
+
const TextField = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
17
|
+
let {
|
|
18
|
+
error,
|
|
19
|
+
success,
|
|
20
|
+
label,
|
|
21
|
+
helperText,
|
|
22
|
+
size = 'large',
|
|
23
|
+
variant = 'solid',
|
|
24
|
+
endAdornment,
|
|
25
|
+
className,
|
|
26
|
+
multiline = false,
|
|
27
|
+
...inputProps
|
|
28
|
+
} = props;
|
|
29
|
+
let [value, setValue] = (0, _react.useState)('');
|
|
30
|
+
let [focused, setFocused] = (0, _react.useState)(false);
|
|
31
|
+
const inputRef = (0, _react.useRef)();
|
|
32
|
+
const handleFocus = e => {
|
|
33
|
+
setFocused(true);
|
|
34
|
+
if (inputProps.onFocus) inputProps.onFocus(e);
|
|
35
|
+
};
|
|
36
|
+
const handleBlur = e => {
|
|
37
|
+
setFocused(false);
|
|
38
|
+
if (inputProps.onBlur) inputProps.onBlur(e);
|
|
39
|
+
};
|
|
40
|
+
let endContent = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
41
|
+
className: _TextFieldModule.default.textfield__adornment,
|
|
42
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
43
|
+
className: _TextFieldModule.default.textfield__icon,
|
|
44
|
+
children: endAdornment
|
|
45
|
+
}), error && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
46
|
+
className: (0, _clsx.default)('material_icon', 'text_error', _TextFieldModule.default.textfield__icon),
|
|
47
|
+
children: "error_outline"
|
|
48
|
+
}), success && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
49
|
+
className: (0, _clsx.default)('material_icon', 'text_success', _TextFieldModule.default.textfield__icon),
|
|
50
|
+
children: "done"
|
|
51
|
+
})]
|
|
52
|
+
});
|
|
53
|
+
let endContentExists = endAdornment || error || success;
|
|
54
|
+
let Component = multiline ? 'textarea' : 'input';
|
|
55
|
+
let realRef = ref || inputRef;
|
|
56
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
57
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(TextFieldContainer, {
|
|
58
|
+
size: size,
|
|
59
|
+
variant: variant,
|
|
60
|
+
disabled: inputProps.disabled,
|
|
61
|
+
focused: focused,
|
|
62
|
+
onClick: () => {
|
|
63
|
+
var _realRef$current;
|
|
64
|
+
return (_realRef$current = realRef.current) == null ? void 0 : _realRef$current.focus();
|
|
65
|
+
},
|
|
66
|
+
className: className,
|
|
67
|
+
error: error,
|
|
68
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(TextFieldInput, {
|
|
69
|
+
Component: Component,
|
|
70
|
+
ref: realRef,
|
|
71
|
+
value: value,
|
|
72
|
+
onChange: e => setValue(e.target.value),
|
|
73
|
+
size: size,
|
|
74
|
+
variant: variant,
|
|
75
|
+
label: label,
|
|
76
|
+
focused: focused,
|
|
77
|
+
error: error,
|
|
78
|
+
multiline: multiline,
|
|
79
|
+
onFocus: handleFocus,
|
|
80
|
+
onBlur: handleBlur,
|
|
81
|
+
...inputProps
|
|
82
|
+
}), endContentExists && endContent]
|
|
83
|
+
}), helperText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_HelperText.default, {
|
|
84
|
+
className: _TextFieldModule.default.textfield__helperText,
|
|
85
|
+
error: error,
|
|
86
|
+
children: helperText
|
|
87
|
+
})]
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
const TextFieldContainer = props => {
|
|
91
|
+
let {
|
|
92
|
+
focused,
|
|
93
|
+
disabled,
|
|
94
|
+
variant,
|
|
95
|
+
size,
|
|
96
|
+
className,
|
|
97
|
+
children,
|
|
98
|
+
error,
|
|
99
|
+
...restProps
|
|
100
|
+
} = props;
|
|
101
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
102
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
103
|
+
...restProps,
|
|
104
|
+
className: (0, _clsx.default)(_TextFieldModule.default.textfield, _TextFieldModule.default['textfield_' + variant], _TextFieldModule.default['size_' + size], {
|
|
105
|
+
[_TextFieldModule.default._focused]: focused,
|
|
106
|
+
[_TextFieldModule.default._disabled]: disabled,
|
|
107
|
+
[_TextFieldModule.default._error]: error
|
|
108
|
+
}, className),
|
|
109
|
+
children: children
|
|
110
|
+
})
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
exports.TextFieldContainer = TextFieldContainer;
|
|
114
|
+
const TextFieldInput = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
115
|
+
let {
|
|
116
|
+
Component = 'input',
|
|
117
|
+
size,
|
|
118
|
+
variant,
|
|
119
|
+
multiline,
|
|
120
|
+
error,
|
|
121
|
+
focused,
|
|
122
|
+
label,
|
|
123
|
+
value,
|
|
124
|
+
className,
|
|
125
|
+
...inputProps
|
|
126
|
+
} = props;
|
|
127
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
128
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
129
|
+
className: (0, _clsx.default)(_TextFieldModule.default.textfield__container, _TextFieldModule.default['size_' + size], {
|
|
130
|
+
[_TextFieldModule.default._label]: !!label,
|
|
131
|
+
[_TextFieldModule.default.textfield__container_outlined]: variant === 'outlined'
|
|
132
|
+
}),
|
|
133
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
134
|
+
ref: ref,
|
|
135
|
+
value: value,
|
|
136
|
+
...inputProps,
|
|
137
|
+
className: (0, _clsx.default)(_TextFieldModule.default.textfield__input, _TextFieldModule.default['size_' + size], _TextFieldModule.default['textfield__input_' + variant], {
|
|
138
|
+
[_TextFieldModule.default._label]: !!label,
|
|
139
|
+
[_TextFieldModule.default._focused]: focused,
|
|
140
|
+
[_TextFieldModule.default._error]: !!error,
|
|
141
|
+
[_TextFieldModule.default.textarea]: multiline
|
|
142
|
+
}, className)
|
|
143
|
+
}), label && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
144
|
+
className: (0, _clsx.default)(_TextFieldModule.default.textfield__label, {
|
|
145
|
+
[_TextFieldModule.default.textfield__label_focused]: focused || !!value || !!props.value,
|
|
146
|
+
[_TextFieldModule.default.textfield__label_small]: size === 'small',
|
|
147
|
+
[_TextFieldModule.default.textfield__label_error]: error
|
|
148
|
+
}),
|
|
149
|
+
children: label
|
|
150
|
+
})]
|
|
151
|
+
})
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
exports.TextFieldInput = TextFieldInput;
|
|
155
|
+
var _default = TextField;
|
|
156
|
+
exports.default = _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
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 _HelperTextModule = _interopRequireDefault(require("./HelperText.module.scss"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const CssClasses = ['helperText', 'helperText_error'];
|
|
10
|
+
|
|
11
|
+
// const css = getCssPrefix(CssClasses)
|
|
12
|
+
|
|
13
|
+
const HelperText = props => {
|
|
14
|
+
let {
|
|
15
|
+
className,
|
|
16
|
+
error,
|
|
17
|
+
children,
|
|
18
|
+
...restProps
|
|
19
|
+
} = props;
|
|
20
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
21
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
22
|
+
...restProps,
|
|
23
|
+
className: (0, _clsx.default)(_HelperTextModule.default.helperText, {
|
|
24
|
+
[_HelperTextModule.default.helperText_error]: !!error
|
|
25
|
+
}, className),
|
|
26
|
+
children: children
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
var _default = HelperText;
|
|
31
|
+
exports.default = _default;
|
|
32
|
+
module.exports = exports.default;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
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 _Checkbox = _interopRequireDefault(require("../Form/Checkbox/Checkbox"));
|
|
8
|
+
var _Adornment = _interopRequireWildcard(require("../Adornment/Adornment"));
|
|
9
|
+
var _ListItemModule = _interopRequireDefault(require("./ListItem.module.scss"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
+
const CssClasses = ['listitem', 'listitem_active', 'listitem_divider', 'listitemText'];
|
|
14
|
+
|
|
15
|
+
// const css = getCssPrefix(CssClasses)
|
|
16
|
+
|
|
17
|
+
const ListItem = props => {
|
|
18
|
+
let {
|
|
19
|
+
children,
|
|
20
|
+
className,
|
|
21
|
+
active,
|
|
22
|
+
divider,
|
|
23
|
+
checked,
|
|
24
|
+
startAdornment,
|
|
25
|
+
endAdornment,
|
|
26
|
+
...restProps
|
|
27
|
+
} = props;
|
|
28
|
+
let withStartAdornment = checked !== undefined || !!startAdornment;
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
30
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
31
|
+
...restProps,
|
|
32
|
+
className: (0, _clsx.default)(_ListItemModule.default.listitem, className, {
|
|
33
|
+
[_ListItemModule.default.listitem_active]: !!active || !!checked,
|
|
34
|
+
[_ListItemModule.default.listitem_divider]: !!divider,
|
|
35
|
+
[_ListItemModule.default.listitem_endAdornment]: !!endAdornment,
|
|
36
|
+
[_ListItemModule.default.listitem_startAdornment]: withStartAdornment
|
|
37
|
+
}),
|
|
38
|
+
children: [withStartAdornment && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Adornment.AdornmentContainer, {
|
|
39
|
+
children: [checked !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Adornment.default, {
|
|
40
|
+
position: 'start',
|
|
41
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
42
|
+
checked: checked,
|
|
43
|
+
size: 'small'
|
|
44
|
+
})
|
|
45
|
+
}), !!startAdornment && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Adornment.default, {
|
|
46
|
+
position: 'start',
|
|
47
|
+
children: startAdornment
|
|
48
|
+
})]
|
|
49
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
50
|
+
className: _ListItemModule.default.listitemText,
|
|
51
|
+
children: children
|
|
52
|
+
}), !!endAdornment && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Adornment.AdornmentContainer, {
|
|
53
|
+
position: 'end',
|
|
54
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Adornment.default, {
|
|
55
|
+
position: 'end',
|
|
56
|
+
children: endAdornment
|
|
57
|
+
})
|
|
58
|
+
})]
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
var _default = ListItem;
|
|
63
|
+
exports.default = _default;
|
|
64
|
+
module.exports = exports.default;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
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 _LoaderModule = _interopRequireDefault(require("./Loader.module.scss"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const CssClasses = ['loader'];
|
|
10
|
+
|
|
11
|
+
// const css = getCssPrefix(CssClasses)
|
|
12
|
+
|
|
13
|
+
const Loader = props => {
|
|
14
|
+
let width = props.size === 'large' ? 25 : props.size === 'medium' ? 23 : props.size === 'small' ? 21 : 27;
|
|
15
|
+
let height = props.size === 'large' ? 24 : props.size === 'medium' ? 22 : props.size === 'small' ? 20 : 26;
|
|
16
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
17
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
18
|
+
className: (0, _clsx.default)(_LoaderModule.default.loader, 'material_icon'),
|
|
19
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
20
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21
|
+
width: width,
|
|
22
|
+
height: height,
|
|
23
|
+
viewBox: `0 0 ${width} ${height}`,
|
|
24
|
+
fill: "none",
|
|
25
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
|
|
26
|
+
opacity: "0.3",
|
|
27
|
+
cx: "12.0003",
|
|
28
|
+
cy: "12",
|
|
29
|
+
r: "8.47059",
|
|
30
|
+
stroke: "#DFE2E6",
|
|
31
|
+
strokeWidth: "1.41176"
|
|
32
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
33
|
+
filter: "url(#filter0_f_1024_93554)",
|
|
34
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
35
|
+
fillRule: "evenodd",
|
|
36
|
+
clipRule: "evenodd",
|
|
37
|
+
d: "M19.575 12.745C20.0016 8.47797 17.0747 4.67221 12.8076 4.24564L12.9481 2.84088C17.9909 3.34501 21.8325 7.87742 21.3283 12.9203C21.2815 13.3888 20.8734 13.7602 20.364 13.7093C19.9468 13.6676 19.5194 13.3009 19.575 12.745Z",
|
|
38
|
+
fill: "url(#paint0_radial_1024_93554)"
|
|
39
|
+
})
|
|
40
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
41
|
+
fillRule: "evenodd",
|
|
42
|
+
clipRule: "evenodd",
|
|
43
|
+
d: "M12.0006 4.23529C7.71225 4.23529 4.23588 7.71167 4.23588 12H2.82411C2.82411 6.93198 6.93256 2.82353 12.0006 2.82353V4.23529Z",
|
|
44
|
+
fill: "url(#paint1_radial_1024_93554)"
|
|
45
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
46
|
+
fillRule: "evenodd",
|
|
47
|
+
clipRule: "evenodd",
|
|
48
|
+
d: "M19.5805 12.0194C19.5805 7.73103 16.2889 4.23529 12.0006 4.23529V2.82353C17.0686 2.82353 21.3426 6.95133 21.3426 12.0194C21.3426 12.4901 20.9734 12.9004 20.4616 12.9004C20.0422 12.9004 19.5805 12.578 19.5805 12.0194Z",
|
|
49
|
+
fill: "url(#paint2_radial_1024_93554)"
|
|
50
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("defs", {
|
|
51
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("filter", {
|
|
52
|
+
id: "filter0_f_1024_93554",
|
|
53
|
+
x: "9.9841",
|
|
54
|
+
y: "0.0173481",
|
|
55
|
+
width: "14.2122",
|
|
56
|
+
height: "16.5202",
|
|
57
|
+
filterUnits: "userSpaceOnUse",
|
|
58
|
+
colorInterpolationFilters: "sRGB",
|
|
59
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("feFlood", {
|
|
60
|
+
floodOpacity: "0",
|
|
61
|
+
result: "BackgroundImageFix"
|
|
62
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("feBlend", {
|
|
63
|
+
mode: "normal",
|
|
64
|
+
in: "SourceGraphic",
|
|
65
|
+
in2: "BackgroundImageFix",
|
|
66
|
+
result: "shape"
|
|
67
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("feGaussianBlur", {
|
|
68
|
+
stdDeviation: "1.41176",
|
|
69
|
+
result: "effect1_foregroundBlur_1024_93554"
|
|
70
|
+
})]
|
|
71
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("radialGradient", {
|
|
72
|
+
id: "paint0_radial_1024_93554",
|
|
73
|
+
cx: "0",
|
|
74
|
+
cy: "0",
|
|
75
|
+
r: "1",
|
|
76
|
+
gradientUnits: "userSpaceOnUse",
|
|
77
|
+
gradientTransform: "translate(20.3817 13.7111) rotate(-126.186) scale(12.6961 11.7694)",
|
|
78
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("stop", {
|
|
79
|
+
offset: "0.395833",
|
|
80
|
+
stopColor: "#98A4B0"
|
|
81
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("stop", {
|
|
82
|
+
offset: "1",
|
|
83
|
+
stopColor: "#98A4B0",
|
|
84
|
+
stopOpacity: "0"
|
|
85
|
+
})]
|
|
86
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("radialGradient", {
|
|
87
|
+
id: "paint1_radial_1024_93554",
|
|
88
|
+
cx: "0",
|
|
89
|
+
cy: "0",
|
|
90
|
+
r: "1",
|
|
91
|
+
gradientUnits: "userSpaceOnUse",
|
|
92
|
+
gradientTransform: "translate(20.4793 12.9004) rotate(-145.457) scale(17.1491 15.8974)",
|
|
93
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("stop", {
|
|
94
|
+
offset: "0.395833",
|
|
95
|
+
stopColor: "#98A4B0"
|
|
96
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("stop", {
|
|
97
|
+
offset: "1",
|
|
98
|
+
stopColor: "#98A4B0",
|
|
99
|
+
stopOpacity: "0"
|
|
100
|
+
})]
|
|
101
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("radialGradient", {
|
|
102
|
+
id: "paint2_radial_1024_93554",
|
|
103
|
+
cx: "0",
|
|
104
|
+
cy: "0",
|
|
105
|
+
r: "1",
|
|
106
|
+
gradientUnits: "userSpaceOnUse",
|
|
107
|
+
gradientTransform: "translate(20.4793 12.9004) rotate(-145.457) scale(17.1491 15.8974)",
|
|
108
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("stop", {
|
|
109
|
+
offset: "0.395833",
|
|
110
|
+
stopColor: "#98A4B0"
|
|
111
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("stop", {
|
|
112
|
+
offset: "1",
|
|
113
|
+
stopColor: "#98A4B0",
|
|
114
|
+
stopOpacity: "0"
|
|
115
|
+
})]
|
|
116
|
+
})]
|
|
117
|
+
})]
|
|
118
|
+
})
|
|
119
|
+
})
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
var _default = Loader;
|
|
123
|
+
exports.default = _default;
|
|
124
|
+
module.exports = exports.default;
|