armtek-uikit-react 1.0.267 → 1.0.268
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/README.md +110 -0
- package/lib/assets/styles.min.css +5474 -0
- package/lib/assets/styles.min.css.map +1 -0
- package/lib/cjs/.cjs +2 -0
- package/lib/cjs/assets/armtek-uikit-react.css +1188 -0
- package/lib/cjs/index.cjs +1 -0
- package/lib/cjs/lib/const/styles.cjs +4 -0
- package/lib/cjs/lib/helpers/genericForwardRef.cjs +7 -0
- package/lib/cjs/lib/helpers/getColorClasses.cjs +14 -0
- package/lib/cjs/lib/helpers/getSizeClasses.cjs +11 -0
- package/lib/cjs/lib/helpers/getVariantClasses.cjs +11 -0
- package/lib/cjs/lib/helpers/helpers.cjs +106 -0
- package/lib/cjs/lib/helpers/helpers.d.ts +21 -0
- package/lib/cjs/lib/helpers/index.cjs +4 -0
- package/lib/cjs/lib/helpers/insertChar.cjs +9 -0
- package/lib/cjs/lib/helpers.cjs +2 -0
- package/lib/cjs/lib/hooks/useClickOutside.cjs +17 -0
- package/lib/cjs/lib/hooks/useEnhancedEffect.cjs +22 -0
- package/lib/cjs/lib/hooks/useEventCallback.cjs +32 -0
- package/lib/cjs/lib/hooks/useLazyRef.cjs +12 -0
- package/lib/cjs/lib/hooks/useTimeout.cjs +38 -0
- package/lib/cjs/lib/services/DateService.cjs +62 -0
- package/lib/cjs/types/theme.cjs +1 -0
- package/lib/cjs/ui/Accordion/Accordion.cjs +88 -0
- package/lib/cjs/ui/Accordion/Accordion.classes.cjs +32 -0
- package/lib/cjs/ui/Accordion/AccordionHeading.cjs +27 -0
- package/lib/cjs/ui/Accordion/index.cjs +6 -0
- package/lib/cjs/ui/Accordion.cjs +2 -0
- package/lib/cjs/ui/Adornment/Adornment.cjs +30 -0
- package/lib/cjs/ui/Adornment/index.cjs +5 -0
- package/lib/cjs/ui/Adornment.cjs +2 -0
- package/lib/cjs/ui/Alert/Alert.cjs +33 -0
- package/lib/cjs/ui/Alert/index.cjs +4 -0
- package/lib/cjs/ui/Alert.cjs +2 -0
- package/lib/cjs/ui/Avatar/Avatar.cjs +34 -0
- package/lib/cjs/ui/Avatar/Avatar.d.ts +15 -0
- package/lib/cjs/ui/Avatar/index.cjs +4 -0
- package/lib/cjs/ui/Avatar.cjs +2 -0
- package/lib/cjs/ui/AvatarGroup/AvatarGroup.cjs +23 -0
- package/lib/cjs/ui/AvatarGroup/index.cjs +4 -0
- package/lib/cjs/ui/AvatarGroup.cjs +2 -0
- package/lib/cjs/ui/BackDrop/BackDrop.cjs +17 -0
- package/lib/cjs/ui/BackDrop/BackDropBase.cjs +27 -0
- package/lib/cjs/ui/BackDrop/index.cjs +4 -0
- package/lib/cjs/ui/BackDrop.cjs +2 -0
- package/lib/cjs/ui/Badge/Badge.cjs +21 -0
- package/lib/cjs/ui/Badge/index.cjs +4 -0
- package/lib/cjs/ui/Badge.cjs +2 -0
- package/lib/cjs/ui/Button/Button.cjs +45 -0
- package/lib/cjs/ui/Button/Button.d.ts +39 -0
- package/lib/cjs/ui/Button/index.cjs +4 -0
- package/lib/cjs/ui/Button.cjs +2 -0
- package/lib/cjs/ui/ButtonGroup/ButtonGroup.cjs +23 -0
- package/lib/cjs/ui/ButtonGroup/index.cjs +4 -0
- package/lib/cjs/ui/ButtonGroup.cjs +2 -0
- package/lib/cjs/ui/ButtonIcon/ButtonIcon.cjs +18 -0
- package/lib/cjs/ui/ButtonIcon/ButtonIcon.d.ts +25 -0
- package/lib/cjs/ui/ButtonIcon/index.cjs +4 -0
- package/lib/cjs/ui/ButtonIcon.cjs +2 -0
- package/lib/cjs/ui/Card/Card.cjs +8 -0
- package/lib/cjs/ui/Card/Card.d.ts +4 -0
- package/lib/cjs/ui/Card/index.cjs +4 -0
- package/lib/cjs/ui/Card.cjs +2 -0
- package/lib/cjs/ui/Chip/Chip.cjs +32 -0
- package/lib/cjs/ui/Chip/Chip.d.ts +16 -0
- package/lib/cjs/ui/Chip/index.cjs +4 -0
- package/lib/cjs/ui/Chip.cjs +2 -0
- package/lib/cjs/ui/Dropdown/Dropdown.cjs +33 -0
- package/lib/cjs/ui/Dropdown/index.cjs +4 -0
- package/lib/cjs/ui/Dropdown.cjs +2 -0
- package/lib/cjs/ui/Form/Checkbox/Checkbox.cjs +47 -0
- package/lib/cjs/ui/Form/Checkbox/const.cjs +4 -0
- package/lib/cjs/ui/Form/Checkbox/index.cjs +4 -0
- package/lib/cjs/ui/Form/Checkbox.cjs +2 -0
- package/lib/cjs/ui/Form/DateField/DateField.cjs +158 -0
- package/lib/cjs/ui/Form/DateField/index.cjs +4 -0
- package/lib/cjs/ui/Form/DateField.cjs +2 -0
- package/lib/cjs/ui/Form/DatePicker/DatePicker.cjs +110 -0
- package/lib/cjs/ui/Form/DatePicker/index.cjs +4 -0
- package/lib/cjs/ui/Form/DatePicker.cjs +2 -0
- package/lib/cjs/ui/Form/FormControls/FormControls.cjs +22 -0
- package/lib/cjs/ui/Form/FormControls/const.cjs +6 -0
- package/lib/cjs/ui/Form/FormControls/index.cjs +4 -0
- package/lib/cjs/ui/Form/FormControls.cjs +2 -0
- package/lib/cjs/ui/Form/Interval/Interval.cjs +76 -0
- package/lib/cjs/ui/Form/Interval/IntervalSlide.cjs +29 -0
- package/lib/cjs/ui/Form/Interval/index.cjs +6 -0
- package/lib/cjs/ui/Form/Interval.cjs +2 -0
- package/lib/cjs/ui/Form/Password/Password.cjs +25 -0
- package/lib/cjs/ui/Form/Password/Password.d.ts +20 -0
- package/lib/cjs/ui/Form/Password/index.cjs +4 -0
- package/lib/cjs/ui/Form/Password.cjs +2 -0
- package/lib/cjs/ui/Form/Period/Period.cjs +140 -0
- package/lib/cjs/ui/Form/Period/Period.d.ts +32 -0
- package/lib/cjs/ui/Form/Period/index.cjs +4 -0
- package/lib/cjs/ui/Form/Period.cjs +2 -0
- package/lib/cjs/ui/Form/PeriodSelect/PeriodSelect.cjs +15 -0
- package/lib/cjs/ui/Form/PeriodSelect/index.cjs +4 -0
- package/lib/cjs/ui/Form/PeriodSelect.cjs +2 -0
- package/lib/cjs/ui/Form/Radio/Radio.cjs +9 -0
- package/lib/cjs/ui/Form/Radio/index.cjs +4 -0
- package/lib/cjs/ui/Form/Radio.cjs +2 -0
- package/lib/cjs/ui/Form/Rating/Rating.cjs +50 -0
- package/lib/cjs/ui/Form/Rating/const.cjs +7 -0
- package/lib/cjs/ui/Form/Rating/index.cjs +4 -0
- package/lib/cjs/ui/Form/Rating.cjs +2 -0
- package/lib/cjs/ui/Form/Select/Select.cjs +213 -0
- package/lib/cjs/ui/Form/Select/Select.d.ts +58 -0
- package/lib/cjs/ui/Form/Select/SelectOptionList.cjs +25 -0
- package/lib/cjs/ui/Form/Select/SelectOptionsContainer.cjs +14 -0
- package/lib/cjs/ui/Form/Select/SelectSummary.cjs +56 -0
- package/lib/cjs/ui/Form/Select/SelectSummary.d.ts +27 -0
- package/lib/cjs/ui/Form/Select/index.cjs +8 -0
- package/lib/cjs/ui/Form/Select.cjs +2 -0
- package/lib/cjs/ui/Form/Switch/Switch.cjs +15 -0
- package/lib/cjs/ui/Form/Switch/index.cjs +4 -0
- package/lib/cjs/ui/Form/Switch.cjs +2 -0
- package/lib/cjs/ui/Form/TextArea/TextArea.cjs +29 -0
- package/lib/cjs/ui/Form/TextArea/TextArea.d.ts +22 -0
- package/lib/cjs/ui/Form/TextArea/index.cjs +4 -0
- package/lib/cjs/ui/Form/TextArea.cjs +2 -0
- package/lib/cjs/ui/Form/TextField/TextField.cjs +120 -0
- package/lib/cjs/ui/Form/TextField/TextField.d.ts +54 -0
- package/lib/cjs/ui/Form/TextField/index.cjs +6 -0
- package/lib/cjs/ui/Form/TextField.cjs +2 -0
- package/lib/cjs/ui/Form/TimeField/TimeField.cjs +9 -0
- package/lib/cjs/ui/Form/TimeField/TimeField.d.ts +28 -0
- package/lib/cjs/ui/Form/TimeField/index.cjs +4 -0
- package/lib/cjs/ui/Form/TimeField.cjs +2 -0
- package/lib/cjs/ui/Form/TimePicker/TimePicker.cjs +13 -0
- package/lib/cjs/ui/Form/TimePicker/index.cjs +4 -0
- package/lib/cjs/ui/Form/TimePicker.cjs +2 -0
- package/lib/cjs/ui/HelperText/HelperText.cjs +18 -0
- package/lib/cjs/ui/HelperText/index.cjs +4 -0
- package/lib/cjs/ui/HelperText.cjs +2 -0
- package/lib/cjs/ui/Icon/Icon.cjs +29 -0
- package/lib/cjs/ui/Icon/Mi.cjs +14 -0
- package/lib/cjs/ui/Icon/Mi.d.ts +6 -0
- package/lib/cjs/ui/Icon/Mis.cjs +8 -0
- package/lib/cjs/ui/Icon/Mis.d.ts +2 -0
- package/lib/cjs/ui/Icon/index.cjs +8 -0
- package/lib/cjs/ui/Icon.cjs +2 -0
- package/lib/cjs/ui/Link/Link.cjs +32 -0
- package/lib/cjs/ui/Link/Link.d.ts +15 -0
- package/lib/cjs/ui/Link/index.cjs +4 -0
- package/lib/cjs/ui/Link.cjs +2 -0
- package/lib/cjs/ui/List/ListItem.cjs +44 -0
- package/lib/cjs/ui/List/index.cjs +4 -0
- package/lib/cjs/ui/List.cjs +2 -0
- package/lib/cjs/ui/Loader/Loader.cjs +19 -0
- package/lib/cjs/ui/Loader/index.cjs +4 -0
- package/lib/cjs/ui/Loader.cjs +2 -0
- package/lib/cjs/ui/Logo/Logo.cjs +46 -0
- package/lib/cjs/ui/Logo/index.cjs +4 -0
- package/lib/cjs/ui/Logo.cjs +2 -0
- package/lib/cjs/ui/Modal/BaseModal.cjs +35 -0
- package/lib/cjs/ui/Modal/Modal.cjs +87 -0
- package/lib/cjs/ui/Modal/const.cjs +6 -0
- package/lib/cjs/ui/Modal/index.cjs +4 -0
- package/lib/cjs/ui/Modal.cjs +2 -0
- package/lib/cjs/ui/Pagination/Pagination.cjs +80 -0
- package/lib/cjs/ui/Pagination/index.cjs +4 -0
- package/lib/cjs/ui/Pagination.cjs +2 -0
- package/lib/cjs/ui/Paper/Paper.cjs +19 -0
- package/lib/cjs/ui/Paper/index.cjs +4 -0
- package/lib/cjs/ui/Paper.cjs +2 -0
- package/lib/cjs/ui/Popover/Popover.cjs +21 -0
- package/lib/cjs/ui/Popover/index.cjs +4 -0
- package/lib/cjs/ui/Popover.cjs +2 -0
- package/lib/cjs/ui/Popper/Popper.cjs +11 -0
- package/lib/cjs/ui/Popper/Popper.d.ts +4 -0
- package/lib/cjs/ui/Popper/PopperBase.cjs +48 -0
- package/lib/cjs/ui/Popper/PopperBase.d.ts +14 -0
- package/lib/cjs/ui/Popper/index.cjs +6 -0
- package/lib/cjs/ui/Popper.cjs +2 -0
- package/lib/cjs/ui/Skeleton/Skeleton.cjs +20 -0
- package/lib/cjs/ui/Skeleton/index.cjs +4 -0
- package/lib/cjs/ui/Skeleton.cjs +2 -0
- package/lib/cjs/ui/Slider/RcSlider.cjs +1 -0
- package/lib/cjs/ui/Slider/Slider.cjs +24 -0
- package/lib/cjs/ui/Slider/index.cjs +4 -0
- package/lib/cjs/ui/Slider.cjs +2 -0
- package/lib/cjs/ui/Stack/Stack.cjs +38 -0
- package/lib/cjs/ui/Stack/Stack.d.ts +10 -0
- package/lib/cjs/ui/Stack/index.cjs +4 -0
- package/lib/cjs/ui/Stack.cjs +2 -0
- package/lib/cjs/ui/Status/Status.cjs +24 -0
- package/lib/cjs/ui/Status/Status.d.ts +13 -0
- package/lib/cjs/ui/Status/index.cjs +4 -0
- package/lib/cjs/ui/Status.cjs +2 -0
- package/lib/cjs/ui/Stepper/StepItem.cjs +35 -0
- package/lib/cjs/ui/Stepper/StepItemIcon.cjs +18 -0
- package/lib/cjs/ui/Stepper/Stepper.cjs +29 -0
- package/lib/cjs/ui/Stepper/index.cjs +4 -0
- package/lib/cjs/ui/Stepper.cjs +2 -0
- package/lib/cjs/ui/Table/Table.cjs +38 -0
- package/lib/cjs/ui/Table/TableBase.cjs +14 -0
- package/lib/cjs/ui/Table/TableCell.cjs +23 -0
- package/lib/cjs/ui/Table/TableRow.cjs +15 -0
- package/lib/cjs/ui/Table/index.cjs +8 -0
- package/lib/cjs/ui/Table.cjs +2 -0
- package/lib/cjs/ui/Tooltip/Tooltip.cjs +65 -0
- package/lib/cjs/ui/Tooltip/index.cjs +4 -0
- package/lib/cjs/ui/Tooltip.cjs +2 -0
- package/lib/esm/.d.ts +1 -0
- package/lib/esm/.js +1 -0
- package/lib/esm/assets/armtek-uikit-react.css +1188 -0
- package/lib/esm/index.d.ts +0 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/lib/const/styles.d.ts +1 -0
- package/lib/esm/lib/const/styles.js +4 -0
- package/lib/esm/lib/helpers/genericForwardRef.d.ts +2 -0
- package/lib/esm/lib/helpers/genericForwardRef.js +7 -0
- package/lib/esm/lib/helpers/getColorClasses.d.ts +1 -0
- package/lib/esm/lib/helpers/getColorClasses.js +14 -0
- package/lib/esm/lib/helpers/getSizeClasses.d.ts +1 -0
- package/lib/esm/lib/helpers/getSizeClasses.js +11 -0
- package/lib/esm/lib/helpers/getVariantClasses.d.ts +1 -0
- package/lib/esm/lib/helpers/getVariantClasses.js +11 -0
- package/lib/esm/lib/helpers/helpers.d.ts +21 -0
- package/lib/esm/lib/helpers/helpers.js +106 -0
- package/lib/esm/lib/helpers/index.d.ts +1 -0
- package/lib/esm/lib/helpers/index.js +4 -0
- package/lib/esm/lib/helpers/insertChar.d.ts +1 -0
- package/lib/esm/lib/helpers/insertChar.js +9 -0
- package/lib/esm/lib/helpers.d.ts +1 -0
- package/lib/esm/lib/helpers.js +1 -0
- package/lib/esm/lib/hooks/useClickOutside.d.ts +3 -0
- package/lib/esm/lib/hooks/useClickOutside.js +17 -0
- package/lib/esm/lib/hooks/useEnhancedEffect.d.ts +10 -0
- package/lib/esm/lib/hooks/useEnhancedEffect.js +5 -0
- package/lib/esm/lib/hooks/useEventCallback.d.ts +3 -0
- package/lib/esm/lib/hooks/useEventCallback.js +15 -0
- package/lib/esm/lib/hooks/useLazyRef.d.ts +1 -0
- package/lib/esm/lib/hooks/useLazyRef.js +12 -0
- package/lib/esm/lib/hooks/useTimeout.d.ts +11 -0
- package/lib/esm/lib/hooks/useTimeout.js +38 -0
- package/lib/esm/lib/services/DateService.d.ts +14 -0
- package/lib/esm/lib/services/DateService.js +62 -0
- package/lib/esm/types/theme.d.ts +11 -0
- package/lib/esm/types/theme.js +1 -0
- package/lib/esm/ui/Accordion/Accordion.classes.d.ts +5 -0
- package/lib/esm/ui/Accordion/Accordion.classes.js +32 -0
- package/lib/esm/ui/Accordion/Accordion.d.ts +19 -0
- package/lib/esm/ui/Accordion/Accordion.js +88 -0
- package/lib/esm/ui/Accordion/AccordionHeading.d.ts +7 -0
- package/lib/esm/ui/Accordion/AccordionHeading.js +27 -0
- package/lib/esm/ui/Accordion/index.d.ts +3 -0
- package/lib/esm/ui/Accordion/index.js +6 -0
- package/lib/esm/ui/Accordion.d.ts +2 -0
- package/lib/esm/ui/Accordion.js +2 -0
- package/lib/esm/ui/Adornment/Adornment.d.ts +12 -0
- package/lib/esm/ui/Adornment/Adornment.js +30 -0
- package/lib/esm/ui/Adornment/index.d.ts +2 -0
- package/lib/esm/ui/Adornment/index.js +5 -0
- package/lib/esm/ui/Adornment.d.ts +2 -0
- package/lib/esm/ui/Adornment.js +2 -0
- package/lib/esm/ui/Alert/Alert.d.ts +12 -0
- package/lib/esm/ui/Alert/Alert.js +33 -0
- package/lib/esm/ui/Alert/index.d.ts +2 -0
- package/lib/esm/ui/Alert/index.js +4 -0
- package/lib/esm/ui/Alert.d.ts +2 -0
- package/lib/esm/ui/Alert.js +2 -0
- package/lib/esm/ui/Avatar/Avatar.d.ts +15 -0
- package/lib/esm/ui/Avatar/Avatar.js +34 -0
- package/lib/esm/ui/Avatar/index.d.ts +2 -0
- package/lib/esm/ui/Avatar/index.js +4 -0
- package/lib/esm/ui/Avatar.d.ts +2 -0
- package/lib/esm/ui/Avatar.js +2 -0
- package/lib/esm/ui/AvatarGroup/AvatarGroup.d.ts +8 -0
- package/lib/esm/ui/AvatarGroup/AvatarGroup.js +23 -0
- package/lib/esm/ui/AvatarGroup/index.d.ts +2 -0
- package/lib/esm/ui/AvatarGroup/index.js +4 -0
- package/lib/esm/ui/AvatarGroup.d.ts +2 -0
- package/lib/esm/ui/AvatarGroup.js +2 -0
- package/lib/esm/ui/BackDrop/BackDrop.d.ts +4 -0
- package/lib/esm/ui/BackDrop/BackDrop.js +17 -0
- package/lib/esm/ui/BackDrop/BackDropBase.d.ts +7 -0
- package/lib/esm/ui/BackDrop/BackDropBase.js +27 -0
- package/lib/esm/ui/BackDrop/index.d.ts +2 -0
- package/lib/esm/ui/BackDrop/index.js +4 -0
- package/lib/esm/ui/BackDrop.d.ts +1 -0
- package/lib/esm/ui/BackDrop.js +1 -0
- package/lib/esm/ui/Badge/Badge.d.ts +12 -0
- package/lib/esm/ui/Badge/Badge.js +21 -0
- package/lib/esm/ui/Badge/index.d.ts +1 -0
- package/lib/esm/ui/Badge/index.js +4 -0
- package/lib/esm/ui/Badge.d.ts +2 -0
- package/lib/esm/ui/Badge.js +2 -0
- package/lib/esm/ui/Button/Button.d.ts +39 -0
- package/lib/esm/ui/Button/Button.js +45 -0
- package/lib/esm/ui/Button/index.d.ts +2 -0
- package/lib/esm/ui/Button/index.js +4 -0
- package/lib/esm/ui/Button.d.ts +2 -0
- package/lib/esm/ui/Button.js +2 -0
- package/lib/esm/ui/ButtonGroup/ButtonGroup.d.ts +6 -0
- package/lib/esm/ui/ButtonGroup/ButtonGroup.js +23 -0
- package/lib/esm/ui/ButtonGroup/index.d.ts +2 -0
- package/lib/esm/ui/ButtonGroup/index.js +4 -0
- package/lib/esm/ui/ButtonGroup.d.ts +2 -0
- package/lib/esm/ui/ButtonGroup.js +2 -0
- package/lib/esm/ui/ButtonIcon/ButtonIcon.d.ts +25 -0
- package/lib/esm/ui/ButtonIcon/ButtonIcon.js +18 -0
- package/lib/esm/ui/ButtonIcon/index.d.ts +2 -0
- package/lib/esm/ui/ButtonIcon/index.js +4 -0
- package/lib/esm/ui/ButtonIcon.d.ts +2 -0
- package/lib/esm/ui/ButtonIcon.js +2 -0
- package/lib/esm/ui/Card/Card.d.ts +4 -0
- package/lib/esm/ui/Card/Card.js +8 -0
- package/lib/esm/ui/Card/index.d.ts +2 -0
- package/lib/esm/ui/Card/index.js +4 -0
- package/lib/esm/ui/Card.d.ts +2 -0
- package/lib/esm/ui/Card.js +2 -0
- package/lib/esm/ui/Chip/Chip.d.ts +16 -0
- package/lib/esm/ui/Chip/Chip.js +32 -0
- package/lib/esm/ui/Chip/index.d.ts +2 -0
- package/lib/esm/ui/Chip/index.js +4 -0
- package/lib/esm/ui/Chip.d.ts +2 -0
- package/lib/esm/ui/Chip.js +2 -0
- package/lib/esm/ui/Dropdown/Dropdown.d.ts +8 -0
- package/lib/esm/ui/Dropdown/Dropdown.js +33 -0
- package/lib/esm/ui/Dropdown/index.d.ts +2 -0
- package/lib/esm/ui/Dropdown/index.js +4 -0
- package/lib/esm/ui/Dropdown.d.ts +2 -0
- package/lib/esm/ui/Dropdown.js +2 -0
- package/lib/esm/ui/Form/Checkbox/Checkbox.d.ts +14 -0
- package/lib/esm/ui/Form/Checkbox/Checkbox.js +47 -0
- package/lib/esm/ui/Form/Checkbox/const.d.ts +1 -0
- package/lib/esm/ui/Form/Checkbox/const.js +4 -0
- package/lib/esm/ui/Form/Checkbox/index.d.ts +2 -0
- package/lib/esm/ui/Form/Checkbox/index.js +4 -0
- package/lib/esm/ui/Form/Checkbox.d.ts +2 -0
- package/lib/esm/ui/Form/Checkbox.js +2 -0
- package/lib/esm/ui/Form/DateField/DateField.d.ts +25 -0
- package/lib/esm/ui/Form/DateField/DateField.js +158 -0
- package/lib/esm/ui/Form/DateField/index.d.ts +2 -0
- package/lib/esm/ui/Form/DateField/index.js +4 -0
- package/lib/esm/ui/Form/DateField.d.ts +2 -0
- package/lib/esm/ui/Form/DateField.js +2 -0
- package/lib/esm/ui/Form/DatePicker/DatePicker.d.ts +5 -0
- package/lib/esm/ui/Form/DatePicker/DatePicker.js +110 -0
- package/lib/esm/ui/Form/DatePicker/index.d.ts +2 -0
- package/lib/esm/ui/Form/DatePicker/index.js +4 -0
- package/lib/esm/ui/Form/DatePicker.d.ts +2 -0
- package/lib/esm/ui/Form/DatePicker.js +2 -0
- package/lib/esm/ui/Form/FormControls/FormControls.d.ts +19 -0
- package/lib/esm/ui/Form/FormControls/FormControls.js +22 -0
- package/lib/esm/ui/Form/FormControls/const.d.ts +2 -0
- package/lib/esm/ui/Form/FormControls/const.js +6 -0
- package/lib/esm/ui/Form/FormControls/index.d.ts +2 -0
- package/lib/esm/ui/Form/FormControls/index.js +4 -0
- package/lib/esm/ui/Form/FormControls.d.ts +1 -0
- package/lib/esm/ui/Form/FormControls.js +1 -0
- package/lib/esm/ui/Form/Interval/Interval.d.ts +14 -0
- package/lib/esm/ui/Form/Interval/Interval.js +76 -0
- package/lib/esm/ui/Form/Interval/IntervalSlide.d.ts +5 -0
- package/lib/esm/ui/Form/Interval/IntervalSlide.js +29 -0
- package/lib/esm/ui/Form/Interval/index.d.ts +3 -0
- package/lib/esm/ui/Form/Interval/index.js +6 -0
- package/lib/esm/ui/Form/Interval.d.ts +2 -0
- package/lib/esm/ui/Form/Interval.js +2 -0
- package/lib/esm/ui/Form/Password/Password.d.ts +20 -0
- package/lib/esm/ui/Form/Password/Password.js +25 -0
- package/lib/esm/ui/Form/Password/index.d.ts +1 -0
- package/lib/esm/ui/Form/Password/index.js +4 -0
- package/lib/esm/ui/Form/Password.d.ts +2 -0
- package/lib/esm/ui/Form/Password.js +2 -0
- package/lib/esm/ui/Form/Period/Period.d.ts +32 -0
- package/lib/esm/ui/Form/Period/Period.js +140 -0
- package/lib/esm/ui/Form/Period/index.d.ts +2 -0
- package/lib/esm/ui/Form/Period/index.js +4 -0
- package/lib/esm/ui/Form/Period.d.ts +2 -0
- package/lib/esm/ui/Form/Period.js +2 -0
- package/lib/esm/ui/Form/PeriodSelect/PeriodSelect.d.ts +2 -0
- package/lib/esm/ui/Form/PeriodSelect/PeriodSelect.js +15 -0
- package/lib/esm/ui/Form/PeriodSelect/index.d.ts +1 -0
- package/lib/esm/ui/Form/PeriodSelect/index.js +4 -0
- package/lib/esm/ui/Form/PeriodSelect.d.ts +2 -0
- package/lib/esm/ui/Form/PeriodSelect.js +2 -0
- package/lib/esm/ui/Form/Radio/Radio.d.ts +3 -0
- package/lib/esm/ui/Form/Radio/Radio.js +9 -0
- package/lib/esm/ui/Form/Radio/index.d.ts +1 -0
- package/lib/esm/ui/Form/Radio/index.js +4 -0
- package/lib/esm/ui/Form/Radio.d.ts +2 -0
- package/lib/esm/ui/Form/Radio.js +2 -0
- package/lib/esm/ui/Form/Rating/Rating.d.ts +23 -0
- package/lib/esm/ui/Form/Rating/Rating.js +50 -0
- package/lib/esm/ui/Form/Rating/const.d.ts +4 -0
- package/lib/esm/ui/Form/Rating/const.js +7 -0
- package/lib/esm/ui/Form/Rating/index.d.ts +2 -0
- package/lib/esm/ui/Form/Rating/index.js +4 -0
- package/lib/esm/ui/Form/Rating.d.ts +2 -0
- package/lib/esm/ui/Form/Rating.js +2 -0
- package/lib/esm/ui/Form/Select/Select.d.ts +58 -0
- package/lib/esm/ui/Form/Select/Select.js +213 -0
- package/lib/esm/ui/Form/Select/SelectOptionList.d.ts +13 -0
- package/lib/esm/ui/Form/Select/SelectOptionList.js +25 -0
- package/lib/esm/ui/Form/Select/SelectOptionsContainer.d.ts +7 -0
- package/lib/esm/ui/Form/Select/SelectOptionsContainer.js +14 -0
- package/lib/esm/ui/Form/Select/SelectSummary.d.ts +27 -0
- package/lib/esm/ui/Form/Select/SelectSummary.js +56 -0
- package/lib/esm/ui/Form/Select/index.d.ts +3 -0
- package/lib/esm/ui/Form/Select/index.js +8 -0
- package/lib/esm/ui/Form/Select.d.ts +2 -0
- package/lib/esm/ui/Form/Select.js +2 -0
- package/lib/esm/ui/Form/Switch/Switch.d.ts +7 -0
- package/lib/esm/ui/Form/Switch/Switch.js +15 -0
- package/lib/esm/ui/Form/Switch/index.d.ts +2 -0
- package/lib/esm/ui/Form/Switch/index.js +4 -0
- package/lib/esm/ui/Form/Switch.d.ts +2 -0
- package/lib/esm/ui/Form/Switch.js +2 -0
- package/lib/esm/ui/Form/TextArea/TextArea.d.ts +22 -0
- package/lib/esm/ui/Form/TextArea/TextArea.js +29 -0
- package/lib/esm/ui/Form/TextArea/index.d.ts +2 -0
- package/lib/esm/ui/Form/TextArea/index.js +4 -0
- package/lib/esm/ui/Form/TextArea.d.ts +2 -0
- package/lib/esm/ui/Form/TextArea.js +2 -0
- package/lib/esm/ui/Form/TextField/TextField.d.ts +54 -0
- package/lib/esm/ui/Form/TextField/TextField.js +120 -0
- package/lib/esm/ui/Form/TextField/index.d.ts +2 -0
- package/lib/esm/ui/Form/TextField/index.js +6 -0
- package/lib/esm/ui/Form/TextField.d.ts +2 -0
- package/lib/esm/ui/Form/TextField.js +2 -0
- package/lib/esm/ui/Form/TimeField/TimeField.d.ts +28 -0
- package/lib/esm/ui/Form/TimeField/TimeField.js +9 -0
- package/lib/esm/ui/Form/TimeField/index.d.ts +1 -0
- package/lib/esm/ui/Form/TimeField/index.js +4 -0
- package/lib/esm/ui/Form/TimeField.d.ts +2 -0
- package/lib/esm/ui/Form/TimeField.js +2 -0
- package/lib/esm/ui/Form/TimePicker/TimePicker.d.ts +2 -0
- package/lib/esm/ui/Form/TimePicker/TimePicker.js +13 -0
- package/lib/esm/ui/Form/TimePicker/index.d.ts +1 -0
- package/lib/esm/ui/Form/TimePicker/index.js +4 -0
- package/lib/esm/ui/Form/TimePicker.d.ts +2 -0
- package/lib/esm/ui/Form/TimePicker.js +2 -0
- package/lib/esm/ui/HelperText/HelperText.d.ts +7 -0
- package/lib/esm/ui/HelperText/HelperText.js +18 -0
- package/lib/esm/ui/HelperText/index.d.ts +1 -0
- package/lib/esm/ui/HelperText/index.js +4 -0
- package/lib/esm/ui/HelperText.d.ts +2 -0
- package/lib/esm/ui/HelperText.js +2 -0
- package/lib/esm/ui/Icon/Icon.d.ts +13 -0
- package/lib/esm/ui/Icon/Icon.js +29 -0
- package/lib/esm/ui/Icon/Mi.d.ts +6 -0
- package/lib/esm/ui/Icon/Mi.js +14 -0
- package/lib/esm/ui/Icon/Mis.d.ts +2 -0
- package/lib/esm/ui/Icon/Mis.js +8 -0
- package/lib/esm/ui/Icon/index.d.ts +4 -0
- package/lib/esm/ui/Icon/index.js +8 -0
- package/lib/esm/ui/Icon.d.ts +2 -0
- package/lib/esm/ui/Icon.js +2 -0
- package/lib/esm/ui/Link/Link.d.ts +15 -0
- package/lib/esm/ui/Link/Link.js +32 -0
- package/lib/esm/ui/Link/index.d.ts +2 -0
- package/lib/esm/ui/Link/index.js +4 -0
- package/lib/esm/ui/Link.d.ts +2 -0
- package/lib/esm/ui/Link.js +2 -0
- package/lib/esm/ui/List/ListItem.d.ts +14 -0
- package/lib/esm/ui/List/ListItem.js +44 -0
- package/lib/esm/ui/List/index.d.ts +2 -0
- package/lib/esm/ui/List/index.js +4 -0
- package/lib/esm/ui/List.d.ts +2 -0
- package/lib/esm/ui/List.js +2 -0
- package/lib/esm/ui/Loader/Loader.d.ts +9 -0
- package/lib/esm/ui/Loader/Loader.js +19 -0
- package/lib/esm/ui/Loader/index.d.ts +2 -0
- package/lib/esm/ui/Loader/index.js +4 -0
- package/lib/esm/ui/Loader.d.ts +2 -0
- package/lib/esm/ui/Loader.js +2 -0
- package/lib/esm/ui/Logo/Logo.d.ts +14 -0
- package/lib/esm/ui/Logo/Logo.js +46 -0
- package/lib/esm/ui/Logo/index.d.ts +2 -0
- package/lib/esm/ui/Logo/index.js +4 -0
- package/lib/esm/ui/Logo.d.ts +2 -0
- package/lib/esm/ui/Logo.js +2 -0
- package/lib/esm/ui/Modal/BaseModal.d.ts +17 -0
- package/lib/esm/ui/Modal/BaseModal.js +35 -0
- package/lib/esm/ui/Modal/Modal.d.ts +9 -0
- package/lib/esm/ui/Modal/Modal.js +87 -0
- package/lib/esm/ui/Modal/const.d.ts +2 -0
- package/lib/esm/ui/Modal/const.js +6 -0
- package/lib/esm/ui/Modal/index.d.ts +2 -0
- package/lib/esm/ui/Modal/index.js +4 -0
- package/lib/esm/ui/Modal.d.ts +1 -0
- package/lib/esm/ui/Modal.js +1 -0
- package/lib/esm/ui/Pagination/Pagination.d.ts +15 -0
- package/lib/esm/ui/Pagination/Pagination.js +80 -0
- package/lib/esm/ui/Pagination/index.d.ts +2 -0
- package/lib/esm/ui/Pagination/index.js +4 -0
- package/lib/esm/ui/Pagination.d.ts +1 -0
- package/lib/esm/ui/Pagination.js +1 -0
- package/lib/esm/ui/Paper/Paper.d.ts +9 -0
- package/lib/esm/ui/Paper/Paper.js +19 -0
- package/lib/esm/ui/Paper/index.d.ts +2 -0
- package/lib/esm/ui/Paper/index.js +4 -0
- package/lib/esm/ui/Paper.d.ts +2 -0
- package/lib/esm/ui/Paper.js +2 -0
- package/lib/esm/ui/Popover/Popover.d.ts +12 -0
- package/lib/esm/ui/Popover/Popover.js +21 -0
- package/lib/esm/ui/Popover/index.d.ts +2 -0
- package/lib/esm/ui/Popover/index.js +4 -0
- package/lib/esm/ui/Popover.d.ts +1 -0
- package/lib/esm/ui/Popover.js +1 -0
- package/lib/esm/ui/Popper/Popper.d.ts +4 -0
- package/lib/esm/ui/Popper/Popper.js +11 -0
- package/lib/esm/ui/Popper/PopperBase.d.ts +14 -0
- package/lib/esm/ui/Popper/PopperBase.js +48 -0
- package/lib/esm/ui/Popper/index.d.ts +2 -0
- package/lib/esm/ui/Popper/index.js +6 -0
- package/lib/esm/ui/Popper.d.ts +1 -0
- package/lib/esm/ui/Popper.js +1 -0
- package/lib/esm/ui/Skeleton/Skeleton.d.ts +8 -0
- package/lib/esm/ui/Skeleton/Skeleton.js +20 -0
- package/lib/esm/ui/Skeleton/index.d.ts +1 -0
- package/lib/esm/ui/Skeleton/index.js +4 -0
- package/lib/esm/ui/Skeleton.d.ts +1 -0
- package/lib/esm/ui/Skeleton.js +1 -0
- package/lib/esm/ui/Slider/RcSlider.d.ts +0 -0
- package/lib/esm/ui/Slider/RcSlider.js +1 -0
- package/lib/esm/ui/Slider/Slider.d.ts +9 -0
- package/lib/esm/ui/Slider/Slider.js +24 -0
- package/lib/esm/ui/Slider/index.d.ts +2 -0
- package/lib/esm/ui/Slider/index.js +4 -0
- package/lib/esm/ui/Slider.d.ts +2 -0
- package/lib/esm/ui/Slider.js +2 -0
- package/lib/esm/ui/Stack/Stack.d.ts +10 -0
- package/lib/esm/ui/Stack/Stack.js +38 -0
- package/lib/esm/ui/Stack/index.d.ts +2 -0
- package/lib/esm/ui/Stack/index.js +4 -0
- package/lib/esm/ui/Stack.d.ts +2 -0
- package/lib/esm/ui/Stack.js +2 -0
- package/lib/esm/ui/Status/Status.d.ts +13 -0
- package/lib/esm/ui/Status/Status.js +24 -0
- package/lib/esm/ui/Status/index.d.ts +1 -0
- package/lib/esm/ui/Status/index.js +4 -0
- package/lib/esm/ui/Status.d.ts +2 -0
- package/lib/esm/ui/Status.js +2 -0
- package/lib/esm/ui/Stepper/StepItem.d.ts +14 -0
- package/lib/esm/ui/Stepper/StepItem.js +35 -0
- package/lib/esm/ui/Stepper/StepItemIcon.d.ts +11 -0
- package/lib/esm/ui/Stepper/StepItemIcon.js +18 -0
- package/lib/esm/ui/Stepper/Stepper.d.ts +12 -0
- package/lib/esm/ui/Stepper/Stepper.js +29 -0
- package/lib/esm/ui/Stepper/index.d.ts +2 -0
- package/lib/esm/ui/Stepper/index.js +4 -0
- package/lib/esm/ui/Stepper.d.ts +2 -0
- package/lib/esm/ui/Stepper.js +2 -0
- package/lib/esm/ui/Table/Table.d.ts +37 -0
- package/lib/esm/ui/Table/Table.js +38 -0
- package/lib/esm/ui/Table/TableBase.d.ts +3 -0
- package/lib/esm/ui/Table/TableBase.js +14 -0
- package/lib/esm/ui/Table/TableCell.d.ts +10 -0
- package/lib/esm/ui/Table/TableCell.js +23 -0
- package/lib/esm/ui/Table/TableRow.d.ts +4 -0
- package/lib/esm/ui/Table/TableRow.js +15 -0
- package/lib/esm/ui/Table/index.d.ts +3 -0
- package/lib/esm/ui/Table/index.js +8 -0
- package/lib/esm/ui/Table.d.ts +1 -0
- package/lib/esm/ui/Table.js +1 -0
- package/lib/esm/ui/Tooltip/Tooltip.d.ts +14 -0
- package/lib/esm/ui/Tooltip/Tooltip.js +65 -0
- package/lib/esm/ui/Tooltip/index.d.ts +2 -0
- package/lib/esm/ui/Tooltip/index.js +4 -0
- package/lib/esm/ui/Tooltip.d.ts +2 -0
- package/lib/esm/ui/Tooltip.js +2 -0
- package/package.json +97 -1
- package/assets/Accordion.scss +0 -123
- package/assets/Adornment.scss +0 -23
- package/assets/Alert.scss +0 -57
- package/assets/Avatar.scss +0 -111
- package/assets/AvatarGroup.scss +0 -48
- package/assets/BackDrop.scss +0 -39
- package/assets/Badge.scss +0 -97
- package/assets/Button.scss +0 -751
- package/assets/ButtonGroup.scss +0 -38
- package/assets/ButtonIcon.scss +0 -59
- package/assets/Card.scss +0 -14
- package/assets/Checkbox.scss +0 -313
- package/assets/Chip.scss +0 -327
- package/assets/DateField.scss +0 -3
- package/assets/DatePicker.scss +0 -73
- package/assets/Dropdown.scss +0 -43
- package/assets/FormControls.scss +0 -15
- package/assets/HelperText.scss +0 -12
- package/assets/Icon.scss +0 -31
- package/assets/Interval.scss +0 -35
- package/assets/Link.scss +0 -97
- package/assets/ListItem.scss +0 -77
- package/assets/Loader.scss +0 -57
- package/assets/Logo.scss +0 -29
- package/assets/Modal.scss +0 -103
- package/assets/Pagination.scss +0 -3
- package/assets/Paper.scss +0 -23
- package/assets/Period.scss +0 -9
- package/assets/Popper.scss +0 -3
- package/assets/Rating.scss +0 -27
- package/assets/Select.scss +0 -86
- package/assets/Skeleton.scss +0 -26
- package/assets/Slider.scss +0 -6
- package/assets/Stack.scss +0 -28
- package/assets/Status.scss +0 -69
- package/assets/StepItem.scss +0 -90
- package/assets/StepItemIcon.scss +0 -48
- package/assets/Stepper.scss +0 -31
- package/assets/Switch.scss +0 -68
- package/assets/Table.scss +0 -53
- package/assets/TextArea.scss +0 -23
- package/assets/TextField.scss +0 -209
- package/assets/Tooltip.scss +0 -18
- package/assets/classes.scss +0 -422
- package/assets/fonts.scss +0 -24
- package/assets/global.scss +0 -222
- package/assets/styles.min.css +0 -1
- package/assets/styles.min.css.map +0 -1
- package/assets/styles.scss +0 -47
- package/assets/variables.scss +0 -13
- package/index.js +0 -43
- package/lib/const/styles.js +0 -5
- package/lib/helpers/genericForwardRef.js +0 -8
- package/lib/helpers/getColorClasses.js +0 -15
- package/lib/helpers/getSizeClasses.js +0 -12
- package/lib/helpers/getVariantClasses.js +0 -12
- package/lib/helpers/helpers.d.ts +0 -21
- package/lib/helpers/helpers.js +0 -73
- package/lib/helpers/index.js +0 -6
- package/lib/helpers/insertChar.js +0 -11
- package/lib/hooks/useClickOutside.js +0 -21
- package/lib/hooks/useEnhancedEffect.js +0 -17
- package/lib/hooks/useEventCallback.js +0 -20
- package/lib/hooks/useLazyRef.js +0 -15
- package/lib/hooks/useTimeout.js +0 -42
- package/lib/services/DateService.js +0 -64
- package/types/theme.js +0 -3
- package/ui/Accordion/Accordion.classes.js +0 -35
- package/ui/Accordion/Accordion.js +0 -137
- package/ui/Accordion/AccordionHeading.js +0 -37
- package/ui/Accordion/index.js +0 -9
- package/ui/Adornment/Adornment.js +0 -46
- package/ui/Adornment/index.js +0 -8
- package/ui/Alert/Alert.js +0 -59
- package/ui/Alert/index.js +0 -8
- package/ui/Avatar/Avatar.d.ts +0 -24
- package/ui/Avatar/Avatar.js +0 -66
- package/ui/Avatar/index.js +0 -8
- package/ui/AvatarGroup/AvatarGroup.js +0 -32
- package/ui/AvatarGroup/index.js +0 -8
- package/ui/BackDrop/BackDrop.js +0 -27
- package/ui/BackDrop/BackDropBase.js +0 -39
- package/ui/BackDrop/index.js +0 -8
- package/ui/Badge/Badge.js +0 -33
- package/ui/Badge/index.js +0 -8
- package/ui/Button/Button.d.ts +0 -39
- package/ui/Button/Button.js +0 -62
- package/ui/Button/index.js +0 -8
- package/ui/ButtonGroup/ButtonGroup.js +0 -32
- package/ui/ButtonGroup/index.js +0 -8
- package/ui/ButtonIcon/ButtonIcon.d.ts +0 -25
- package/ui/ButtonIcon/ButtonIcon.js +0 -35
- package/ui/ButtonIcon/index.js +0 -8
- package/ui/Card/Card.d.ts +0 -4
- package/ui/Card/Card.js +0 -19
- package/ui/Card/index.js +0 -8
- package/ui/Chip/Chip.d.ts +0 -18
- package/ui/Chip/Chip.js +0 -74
- package/ui/Chip/index.js +0 -8
- package/ui/Dropdown/Dropdown.js +0 -62
- package/ui/Dropdown/index.js +0 -8
- package/ui/Form/Checkbox/Checkbox.js +0 -68
- package/ui/Form/Checkbox/const.js +0 -5
- package/ui/Form/Checkbox/index.js +0 -8
- package/ui/Form/DateField/DateField.js +0 -231
- package/ui/Form/DateField/index.js +0 -8
- package/ui/Form/DatePicker/DatePicker.js +0 -169
- package/ui/Form/DatePicker/index.js +0 -8
- package/ui/Form/DatePicker/styles.css +0 -803
- package/ui/Form/FormControls/FormControls.js +0 -50
- package/ui/Form/FormControls/const.js +0 -6
- package/ui/Form/FormControls/index.js +0 -8
- package/ui/Form/Interval/Interval.js +0 -118
- package/ui/Form/Interval/IntervalSlide.js +0 -55
- package/ui/Form/Interval/index.js +0 -9
- package/ui/Form/Password/Password.d.ts +0 -24
- package/ui/Form/Password/Password.js +0 -46
- package/ui/Form/Password/index.js +0 -8
- package/ui/Form/Period/Period.d.ts +0 -32
- package/ui/Form/Period/Period.js +0 -193
- package/ui/Form/Period/index.js +0 -8
- package/ui/Form/PeriodSelect/PeriodSelect.js +0 -28
- package/ui/Form/PeriodSelect/index.js +0 -8
- package/ui/Form/Radio/Radio.js +0 -19
- package/ui/Form/Radio/index.js +0 -8
- package/ui/Form/Rating/Rating.js +0 -74
- package/ui/Form/Rating/const.js +0 -8
- package/ui/Form/Rating/index.js +0 -8
- package/ui/Form/Select/Select.d.ts +0 -58
- package/ui/Form/Select/Select.js +0 -330
- package/ui/Form/Select/SelectOptionList.js +0 -38
- package/ui/Form/Select/SelectOptionsContainer.js +0 -20
- package/ui/Form/Select/SelectSummary.d.ts +0 -27
- package/ui/Form/Select/SelectSummary.js +0 -114
- package/ui/Form/Select/index.js +0 -11
- package/ui/Form/Switch/Switch.js +0 -27
- package/ui/Form/Switch/index.js +0 -8
- package/ui/Form/TextArea/TextArea.d.ts +0 -32
- package/ui/Form/TextArea/TextArea.js +0 -51
- package/ui/Form/TextArea/index.js +0 -8
- package/ui/Form/TextField/TextField.d.ts +0 -66
- package/ui/Form/TextField/TextField.js +0 -292
- package/ui/Form/TextField/index.js +0 -9
- package/ui/Form/TimeField/TimeField.d.ts +0 -28
- package/ui/Form/TimeField/TimeField.js +0 -20
- package/ui/Form/TimeField/index.js +0 -8
- package/ui/Form/TimePicker/TimePicker.js +0 -27
- package/ui/Form/TimePicker/index.js +0 -8
- package/ui/HelperText/HelperText.js +0 -28
- package/ui/HelperText/index.js +0 -8
- package/ui/Icon/Icon.js +0 -41
- package/ui/Icon/Mi.d.ts +0 -22
- package/ui/Icon/Mi.js +0 -31
- package/ui/Icon/Mis.d.ts +0 -2
- package/ui/Icon/Mis.js +0 -16
- package/ui/Icon/index.js +0 -11
- package/ui/Link/Link.d.ts +0 -16
- package/ui/Link/Link.js +0 -45
- package/ui/Link/index.js +0 -8
- package/ui/List/ListItem.js +0 -76
- package/ui/List/index.js +0 -8
- package/ui/Loader/Loader.js +0 -28
- package/ui/Loader/index.js +0 -8
- package/ui/Logo/Logo.js +0 -110
- package/ui/Logo/index.js +0 -8
- package/ui/Modal/BaseModal.js +0 -84
- package/ui/Modal/Modal.js +0 -110
- package/ui/Modal/const.js +0 -6
- package/ui/Modal/index.js +0 -8
- package/ui/Pagination/Pagination.js +0 -158
- package/ui/Pagination/index.js +0 -8
- package/ui/Paper/Paper.js +0 -29
- package/ui/Paper/index.js +0 -8
- package/ui/Popover/Popover.js +0 -37
- package/ui/Popover/index.js +0 -8
- package/ui/Popper/Popper.d.ts +0 -4
- package/ui/Popper/Popper.js +0 -21
- package/ui/Popper/PopperBase.d.ts +0 -14
- package/ui/Popper/PopperBase.js +0 -60
- package/ui/Popper/index.js +0 -9
- package/ui/Skeleton/Skeleton.js +0 -28
- package/ui/Skeleton/index.js +0 -8
- package/ui/Slider/RcSlider.js +0 -1
- package/ui/Slider/Slider.js +0 -40
- package/ui/Slider/index.js +0 -8
- package/ui/Slider/style.scss +0 -347
- package/ui/Stack/Stack.d.ts +0 -10
- package/ui/Stack/Stack.js +0 -62
- package/ui/Stack/index.js +0 -8
- package/ui/Status/Status.d.ts +0 -14
- package/ui/Status/Status.js +0 -39
- package/ui/Status/index.js +0 -8
- package/ui/Stepper/StepItem.js +0 -55
- package/ui/Stepper/StepItemIcon.js +0 -38
- package/ui/Stepper/Stepper.js +0 -49
- package/ui/Stepper/index.js +0 -8
- package/ui/Table/Table.js +0 -64
- package/ui/Table/TableBase.js +0 -21
- package/ui/Table/TableCell.js +0 -35
- package/ui/Table/TableRow.js +0 -24
- package/ui/Table/index.js +0 -10
- package/ui/Tooltip/Tooltip.js +0 -88
- package/ui/Tooltip/index.js +0 -8
- /package/{index.d.ts → lib/cjs/index.d.ts} +0 -0
- /package/lib/{const → cjs/lib/const}/styles.d.ts +0 -0
- /package/lib/{helpers → cjs/lib/helpers}/genericForwardRef.d.ts +0 -0
- /package/lib/{helpers → cjs/lib/helpers}/getColorClasses.d.ts +0 -0
- /package/lib/{helpers → cjs/lib/helpers}/getSizeClasses.d.ts +0 -0
- /package/lib/{helpers → cjs/lib/helpers}/getVariantClasses.d.ts +0 -0
- /package/lib/{helpers → cjs/lib/helpers}/index.d.ts +0 -0
- /package/lib/{helpers → cjs/lib/helpers}/insertChar.d.ts +0 -0
- /package/lib/{hooks → cjs/lib/hooks}/useClickOutside.d.ts +0 -0
- /package/lib/{hooks → cjs/lib/hooks}/useEnhancedEffect.d.ts +0 -0
- /package/lib/{hooks → cjs/lib/hooks}/useEventCallback.d.ts +0 -0
- /package/lib/{hooks → cjs/lib/hooks}/useLazyRef.d.ts +0 -0
- /package/lib/{hooks → cjs/lib/hooks}/useTimeout.d.ts +0 -0
- /package/lib/{services → cjs/lib/services}/DateService.d.ts +0 -0
- /package/{types → lib/cjs/types}/theme.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Accordion/Accordion.classes.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Accordion/Accordion.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Accordion/AccordionHeading.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Accordion/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Adornment/Adornment.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Adornment/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Alert/Alert.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Alert/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Avatar/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/AvatarGroup/AvatarGroup.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/AvatarGroup/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/BackDrop/BackDrop.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/BackDrop/BackDropBase.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/BackDrop/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Badge/Badge.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Badge/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Button/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/ButtonGroup/ButtonGroup.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/ButtonGroup/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/ButtonIcon/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Card/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Chip/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Dropdown/Dropdown.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Dropdown/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Checkbox/Checkbox.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Checkbox/const.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Checkbox/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/DateField/DateField.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/DateField/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/DatePicker/DatePicker.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/DatePicker/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/FormControls/FormControls.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/FormControls/const.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/FormControls/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Interval/Interval.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Interval/IntervalSlide.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Interval/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Password/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Period/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/PeriodSelect/PeriodSelect.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/PeriodSelect/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Radio/Radio.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Radio/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Rating/Rating.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Rating/const.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Rating/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Select/SelectOptionList.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Select/SelectOptionsContainer.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Select/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Switch/Switch.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/Switch/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/TextArea/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/TextField/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/TimeField/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/TimePicker/TimePicker.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Form/TimePicker/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/HelperText/HelperText.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/HelperText/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Icon/Icon.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Icon/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Link/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/List/ListItem.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/List/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Loader/Loader.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Loader/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Logo/Logo.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Logo/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Modal/BaseModal.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Modal/Modal.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Modal/const.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Modal/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Pagination/Pagination.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Pagination/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Paper/Paper.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Paper/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Popover/Popover.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Popover/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Popper/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Skeleton/Skeleton.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Skeleton/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Slider/RcSlider.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Slider/Slider.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Slider/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Stack/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Status/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Stepper/StepItem.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Stepper/StepItemIcon.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Stepper/Stepper.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Stepper/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Table/Table.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Table/TableBase.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Table/TableCell.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Table/TableRow.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Table/index.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Tooltip/Tooltip.d.ts +0 -0
- /package/{ui → lib/cjs/ui}/Tooltip/index.d.ts +0 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const ui_Form_TextField_TextField = require("../TextField/TextField.cjs");
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const ui_Card_Card = require("../../Card/Card.cjs");
|
|
7
|
+
const ui_Form_DatePicker_DatePicker = require("../DatePicker/DatePicker.cjs");
|
|
8
|
+
const ui_ButtonIcon_ButtonIcon = require("../../ButtonIcon/ButtonIcon.cjs");
|
|
9
|
+
const ui_BackDrop_BackDrop = require("../../BackDrop/BackDrop.cjs");
|
|
10
|
+
const ui_Popper_PopperBase = require("../../Popper/PopperBase.cjs");
|
|
11
|
+
const lib_services_DateService = require("../../../lib/services/DateService.cjs");
|
|
12
|
+
const getDateFormat = (format) => {
|
|
13
|
+
let out = {};
|
|
14
|
+
if (!format) return out;
|
|
15
|
+
if (format.includes("dd")) out.day = "2-digit";
|
|
16
|
+
if (format.includes("MM")) out.month = "2-digit";
|
|
17
|
+
if (format.includes("yyyy")) out.year = "numeric";
|
|
18
|
+
if (format.includes("HH")) out.hour = "2-digit";
|
|
19
|
+
if (format.includes("mm")) out.minute = "2-digit";
|
|
20
|
+
return out;
|
|
21
|
+
};
|
|
22
|
+
const dateToText = (d, format) => {
|
|
23
|
+
if (!d) return "";
|
|
24
|
+
if (typeof d === "string") d = new Date(d);
|
|
25
|
+
return d.toLocaleString("ru-RU", getDateFormat(format));
|
|
26
|
+
};
|
|
27
|
+
const DateField = React.forwardRef((props, ref) => {
|
|
28
|
+
let {
|
|
29
|
+
onChange,
|
|
30
|
+
inputProps,
|
|
31
|
+
onInput,
|
|
32
|
+
label,
|
|
33
|
+
placeholder,
|
|
34
|
+
className,
|
|
35
|
+
showTime,
|
|
36
|
+
error,
|
|
37
|
+
helperText,
|
|
38
|
+
showTimeOnly,
|
|
39
|
+
disabled,
|
|
40
|
+
value,
|
|
41
|
+
...datepickerProps
|
|
42
|
+
} = props;
|
|
43
|
+
let format = "dd.MM.yyyy";
|
|
44
|
+
if (showTime && !showTimeOnly) format = "dd.MM.yyyy HH:mm";
|
|
45
|
+
else if (showTimeOnly) format = "HH:mm";
|
|
46
|
+
const [date, setDate] = React.useState(null);
|
|
47
|
+
const [open, setOpen] = React.useState(false);
|
|
48
|
+
const [text, setText] = React.useState(dateToText(value, format));
|
|
49
|
+
React.useEffect(() => {
|
|
50
|
+
if (value) setText(dateToText(value, format));
|
|
51
|
+
}, [value]);
|
|
52
|
+
const handleChange = (d) => {
|
|
53
|
+
setDate(d);
|
|
54
|
+
if (!showTime || showTime && d && d.getHours() > 0) setOpen(false);
|
|
55
|
+
if (onChange) {
|
|
56
|
+
const e = new Event("input", {
|
|
57
|
+
bubbles: true
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(e, "target", {
|
|
60
|
+
writable: false,
|
|
61
|
+
value: {
|
|
62
|
+
name: props.name,
|
|
63
|
+
value: d
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
onChange(e);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const handleClick = (e) => {
|
|
70
|
+
setOpen((prev) => !prev);
|
|
71
|
+
if (props.onClick) props.onClick(e);
|
|
72
|
+
};
|
|
73
|
+
const btnRef = React.useRef();
|
|
74
|
+
const inputIcon = showTime && showTimeOnly ? "schedule" : "calendar_today";
|
|
75
|
+
const handleSelectDate = (date2) => {
|
|
76
|
+
setText(dateToText(date2, format));
|
|
77
|
+
handleChange(date2);
|
|
78
|
+
};
|
|
79
|
+
const processChange = (value2) => {
|
|
80
|
+
if (disabled) return;
|
|
81
|
+
const bs = (text.endsWith(".") || text.endsWith(" ") || text.endsWith(":")) && text.length > value2.length;
|
|
82
|
+
let matcher = /^\d{2}\.\d{2}\.\d{4}$/;
|
|
83
|
+
if (!bs) {
|
|
84
|
+
value2 = value2.replace(/[^\d ]/g, "");
|
|
85
|
+
if (showTimeOnly) {
|
|
86
|
+
matcher = /^\d{2}:\d{2}$/;
|
|
87
|
+
value2 = value2.replace(/^(\d{2})/, "$1:").replace(/^(\d{2}):(\d{2})(\d)$/, "$1:$2");
|
|
88
|
+
} else {
|
|
89
|
+
value2 = value2.replace(/[^\d ]/g, "").replace(/^(\d{2})/, "$1.").replace(/^(\d{2})\.(\d{2})/, "$1.$2.").replace(/^(\d{2})\.(\d{2})\.(\d{4})/, "$1.$2.$3");
|
|
90
|
+
if (showTime) {
|
|
91
|
+
value2 = value2.replace(/^(\d{2})\.(\d{2})\.(\d{4})(\d)/, "$1.$2.$3 $4").replace(/^(\d{2})\.(\d{2})\.(\d{4}) (\d{2})/, "$1.$2.$3 $4:").replace(/^(\d{2})\.(\d{2})\.(\d{4})(\d{2})/, "$1.$2.$3 $4:").replace(/^(\d{2})\.(\d{2})\.(\d{4}) (\d{2}):(\d{2})/, "$1.$2.$3 $4:$5").replace(/^(\d{2})\.(\d{2})\.(\d{4}) (\d{2}):(\d{2})(\d)/, "$1.$2.$3 $4:$5");
|
|
92
|
+
matcher = /\d{2}\.\d{2}\.\d{4} \d{2}:\d{2}/;
|
|
93
|
+
} else value2 = value2.replace(/^(\d{2})\.(\d{2})\.(\d{4})(\d)/, "$1.$2.$3");
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
setText(value2);
|
|
97
|
+
setDate(null);
|
|
98
|
+
if (!bs && value2.match(new RegExp(matcher))) {
|
|
99
|
+
const dateAndTimeParts = value2.split(" ");
|
|
100
|
+
const dateParts = dateAndTimeParts[0].split(".");
|
|
101
|
+
let parseString = "";
|
|
102
|
+
let timestamp;
|
|
103
|
+
if (showTimeOnly) {
|
|
104
|
+
const today = /* @__PURE__ */ new Date();
|
|
105
|
+
const hourParts = value2.split(":").map(Number);
|
|
106
|
+
today.setHours(hourParts[0], hourParts[1], hourParts[2] || 0, 0);
|
|
107
|
+
timestamp = today.getTime();
|
|
108
|
+
} else {
|
|
109
|
+
parseString = `${dateParts[2]}-${dateParts[1]}-${dateParts[0]}`;
|
|
110
|
+
if (showTime) parseString = parseString + ` ${dateAndTimeParts[1]}`;
|
|
111
|
+
timestamp = Date.parse(parseString);
|
|
112
|
+
}
|
|
113
|
+
if (isNaN(timestamp) === false) {
|
|
114
|
+
const d = new Date(timestamp);
|
|
115
|
+
if (datepickerProps.minDate && lib_services_DateService.isDateBigger(datepickerProps.minDate, d)) {
|
|
116
|
+
setText("");
|
|
117
|
+
handleChange(null);
|
|
118
|
+
} else if (datepickerProps.maxDate && lib_services_DateService.isDateBigger(d, datepickerProps.maxDate)) {
|
|
119
|
+
setText("");
|
|
120
|
+
handleChange(null);
|
|
121
|
+
} else {
|
|
122
|
+
setText(d.toLocaleString("ru-RU", getDateFormat(format)));
|
|
123
|
+
handleChange(d);
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
setText("");
|
|
127
|
+
handleChange(null);
|
|
128
|
+
}
|
|
129
|
+
} else {
|
|
130
|
+
handleChange(null);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
const handleChangeText = (e) => {
|
|
134
|
+
processChange(e.target.value);
|
|
135
|
+
};
|
|
136
|
+
const handlePaste = (e) => {
|
|
137
|
+
processChange(e.currentTarget.value);
|
|
138
|
+
};
|
|
139
|
+
let realValue = value !== void 0 ? value : date;
|
|
140
|
+
let dateValue = typeof realValue === "string" ? new Date(realValue) : realValue;
|
|
141
|
+
if (!(dateValue instanceof Date && !isNaN(dateValue.getDate()))) dateValue = null;
|
|
142
|
+
const calendarBtn = /* @__PURE__ */ jsxRuntime.jsx(ui_ButtonIcon_ButtonIcon.default, { disabled, size: "medium", variant: "transparent", onClick: handleClick, color: "neutral", "data-testid": "datefield-btn", children: /* @__PURE__ */ jsxRuntime.jsx("span", { ref: btnRef, className: "material_icon", children: inputIcon }) });
|
|
143
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
144
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui_Form_TextField_TextField.TextField, { ref, label, placeholder, className, error, helperText, ...inputProps, value: text || "", disabled, onChange: handleChangeText, onPaste: handlePaste, endAdornment: calendarBtn }),
|
|
145
|
+
open && /* @__PURE__ */ jsxRuntime.jsx(ui_BackDrop_BackDrop.default, { onClick: () => setOpen(false), children: /* @__PURE__ */ jsxRuntime.jsx(ui_Popper_PopperBase.PopperBase, { anchorEl: btnRef.current, className: "arm-datefield-popper", open, placement: "bottom-end", children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
146
|
+
backgroundColor: "#fff",
|
|
147
|
+
width: "100%"
|
|
148
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsx(ui_Form_DatePicker_DatePicker.default, { timeIntervals: 15, calendarContainer: PickerCard, popperPlacement: "top-end", dateFormat: format, ...datepickerProps, onChange: handleSelectDate, selected: dateValue, showTimeSelect: !!showTime, showTimeSelectOnly: !!showTimeOnly && !!showTime, disabled, inline: true }) }) }) })
|
|
149
|
+
] });
|
|
150
|
+
});
|
|
151
|
+
const PickerCard = (props) => {
|
|
152
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ui_Card_Card.default, { style: {
|
|
153
|
+
zIndex: 6
|
|
154
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: props.className, children: props.children }) });
|
|
155
|
+
};
|
|
156
|
+
exports.DateField = DateField;
|
|
157
|
+
exports.default = DateField;
|
|
158
|
+
exports.getDateFormat = getDateFormat;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const ReactDatePicker = require("react-datepicker");
|
|
6
|
+
;/* empty css */
|
|
7
|
+
const ru = require("date-fns/locale/ru");
|
|
8
|
+
const format = require("date-fns/format");
|
|
9
|
+
const ui_ButtonIcon_ButtonIcon = require("../../ButtonIcon/ButtonIcon.cjs");
|
|
10
|
+
const ui_Stack_Stack = require("../../Stack/Stack.cjs");
|
|
11
|
+
const ui_Form_Select_Select = require("../Select/Select.cjs");
|
|
12
|
+
const clsx = require("clsx");
|
|
13
|
+
require("../../Button/Button.cjs");
|
|
14
|
+
const renderDayContents = (day) => {
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "customDay", children: day });
|
|
16
|
+
};
|
|
17
|
+
const DatePicker = React.forwardRef((props, ref) => {
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ui-datepicker", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
19
|
+
ReactDatePicker,
|
|
20
|
+
{
|
|
21
|
+
ref,
|
|
22
|
+
locale: ru.ru,
|
|
23
|
+
inline: true,
|
|
24
|
+
renderDayContents,
|
|
25
|
+
...props,
|
|
26
|
+
renderCustomHeader: (headerProps) => {
|
|
27
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PickerHeader, { ...headerProps, ...props });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
) }) });
|
|
31
|
+
});
|
|
32
|
+
function range(end, start) {
|
|
33
|
+
const numbers = [];
|
|
34
|
+
for (let i = end; i <= start; i++) {
|
|
35
|
+
numbers.push(i);
|
|
36
|
+
}
|
|
37
|
+
numbers.reverse();
|
|
38
|
+
return numbers;
|
|
39
|
+
}
|
|
40
|
+
function getYear(date) {
|
|
41
|
+
return date.getFullYear();
|
|
42
|
+
}
|
|
43
|
+
function getMonth(date) {
|
|
44
|
+
return date.getMonth();
|
|
45
|
+
}
|
|
46
|
+
const getMonthNames = () => {
|
|
47
|
+
const months2 = [];
|
|
48
|
+
for (let i = 0; i < 12; i++) {
|
|
49
|
+
const date = /* @__PURE__ */ new Date();
|
|
50
|
+
date.setMonth(i);
|
|
51
|
+
months2.push(format.format(date, "LLLL", {
|
|
52
|
+
locale: ru.ru
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
return months2;
|
|
56
|
+
};
|
|
57
|
+
const getYears = (minYear, maxYear) => {
|
|
58
|
+
return range(minYear, maxYear);
|
|
59
|
+
};
|
|
60
|
+
const months = getMonthNames();
|
|
61
|
+
const PickerHeader = (props) => {
|
|
62
|
+
const {
|
|
63
|
+
decreaseMonth,
|
|
64
|
+
prevMonthButtonDisabled,
|
|
65
|
+
date,
|
|
66
|
+
changeYear,
|
|
67
|
+
changeMonth,
|
|
68
|
+
increaseMonth,
|
|
69
|
+
nextMonthButtonDisabled,
|
|
70
|
+
maxDate,
|
|
71
|
+
minDate
|
|
72
|
+
} = props;
|
|
73
|
+
const years = getYears(minDate ? minDate.getFullYear() : 1920, maxDate ? maxDate.getFullYear() : (/* @__PURE__ */ new Date()).getFullYear() + 5);
|
|
74
|
+
const showMonthPickerProp = props.showMonthDropdown !== false && "showMonthDropdown" in props;
|
|
75
|
+
const showYearPickerProp = props.showYearDropdown !== false && "showYearDropdown" in props;
|
|
76
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
77
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ui_Stack_Stack.default, { spacing: "small", center: true, className: "justify-between", children: [
|
|
78
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui_ButtonIcon_ButtonIcon.default, { size: "small", mi: "keyboard_arrow_left", onClick: decreaseMonth, disabled: prevMonthButtonDisabled }),
|
|
79
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "react-datepicker__current-month", children: format.format(date, "LLLL yyyy", {
|
|
80
|
+
locale: ru.ru
|
|
81
|
+
}) }),
|
|
82
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui_ButtonIcon_ButtonIcon.default, { size: "small", mi: "keyboard_arrow_right", onClick: increaseMonth, disabled: nextMonthButtonDisabled })
|
|
83
|
+
] }),
|
|
84
|
+
(showMonthPickerProp || showYearPickerProp) && /* @__PURE__ */ jsxRuntime.jsxs(ui_Stack_Stack.default, { spacing: "small", center: true, className: "justify-center", children: [
|
|
85
|
+
showYearPickerProp && /* @__PURE__ */ jsxRuntime.jsx(ui_Form_Select_Select.default, { className: "arm-datepicker__select", size: "small", classes: {
|
|
86
|
+
root: "arm-datepicker__select_root",
|
|
87
|
+
wrapper: "arm-datepicker__select-wrapper"
|
|
88
|
+
}, variant: "outlined", value: String(getYear(date)), onChange: ({
|
|
89
|
+
target: {
|
|
90
|
+
value
|
|
91
|
+
}
|
|
92
|
+
}) => changeYear(value), options: years.map((item) => ({
|
|
93
|
+
value: String(item),
|
|
94
|
+
text: String(item)
|
|
95
|
+
})), optionClassName: "arm-datepicker__select-option" }),
|
|
96
|
+
showMonthPickerProp && /* @__PURE__ */ jsxRuntime.jsx(ui_Form_Select_Select.default, { className: clsx("arm-datepicker__select", "arm-datepicker__select_month"), classes: {
|
|
97
|
+
root: "arm-datepicker__select_root",
|
|
98
|
+
wrapper: "arm-datepicker__select-wrapper"
|
|
99
|
+
}, size: "small", variant: "outlined", value: String(months[getMonth(date)]), onChange: ({
|
|
100
|
+
target: {
|
|
101
|
+
value
|
|
102
|
+
}
|
|
103
|
+
}) => changeMonth(months.indexOf(value)), options: months.map((item) => ({
|
|
104
|
+
value: String(item),
|
|
105
|
+
text: String(item)
|
|
106
|
+
})), optionClassName: "arm-datepicker__select-option" })
|
|
107
|
+
] })
|
|
108
|
+
] });
|
|
109
|
+
};
|
|
110
|
+
exports.default = DatePicker;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const clsx = require("clsx");
|
|
5
|
+
const ui_Button_Button = require("../../Button/Button.cjs");
|
|
6
|
+
const ui_Form_FormControls_const = require("./const.cjs");
|
|
7
|
+
const FormControls = (props) => {
|
|
8
|
+
const {
|
|
9
|
+
onSubmit,
|
|
10
|
+
onCancel,
|
|
11
|
+
submitProps,
|
|
12
|
+
cancelProps,
|
|
13
|
+
className,
|
|
14
|
+
classes,
|
|
15
|
+
...divProps
|
|
16
|
+
} = props;
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx(ui_Form_FormControls_const.FORM_CONTROLS_CLASSNAME), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "form-controls", ...divProps, className: clsx(className, "arm-form-controls__stack"), children: [
|
|
18
|
+
(onSubmit || (submitProps == null ? void 0 : submitProps.type) === "submit") && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "arm-form-controls__button", children: /* @__PURE__ */ jsxRuntime.jsx(ui_Button_Button.default, { "data-testid": "form-controls-submit", variant: "contained", color: "primary", onClick: onSubmit, ...submitProps, className: clsx("arm-form-controls__btn", classes == null ? void 0 : classes.submitBtn), children: submitProps == null ? void 0 : submitProps.text }) }),
|
|
19
|
+
onCancel && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "arm-form-controls__button", children: /* @__PURE__ */ jsxRuntime.jsx(ui_Button_Button.default, { "data-testid": "form-controls-cancel", variant: "outlined", color: "primary", onClick: onCancel, ...cancelProps, className: clsx("arm-form-controls__btn", classes == null ? void 0 : classes.cancelBtn), children: cancelProps == null ? void 0 : cancelProps.text }) })
|
|
20
|
+
] }) });
|
|
21
|
+
};
|
|
22
|
+
exports.default = FormControls;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const FORM_CONTROLS_CLASSNAME = "arm-form-controls";
|
|
4
|
+
const FORM_CONTROLS_SKIP_REPLACE_CLASSNAME = "_skip_replace";
|
|
5
|
+
exports.FORM_CONTROLS_CLASSNAME = FORM_CONTROLS_CLASSNAME;
|
|
6
|
+
exports.FORM_CONTROLS_SKIP_REPLACE_CLASSNAME = FORM_CONTROLS_SKIP_REPLACE_CLASSNAME;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const ui_Form_TextField_TextField = require("../TextField/TextField.cjs");
|
|
6
|
+
const ui_HelperText_HelperText = require("../../HelperText/HelperText.cjs");
|
|
7
|
+
function Interval(props) {
|
|
8
|
+
const {
|
|
9
|
+
value,
|
|
10
|
+
defaultValue,
|
|
11
|
+
labelStart,
|
|
12
|
+
labelEnd,
|
|
13
|
+
onChange,
|
|
14
|
+
helperText,
|
|
15
|
+
error,
|
|
16
|
+
disabled,
|
|
17
|
+
min = 0,
|
|
18
|
+
max = 0,
|
|
19
|
+
range,
|
|
20
|
+
...inputProps
|
|
21
|
+
} = props;
|
|
22
|
+
const [focused, setFocused] = React.useState(false);
|
|
23
|
+
const [currentMin, setCurrentMin] = React.useState(min);
|
|
24
|
+
const [currentMax, setCurrentMax] = React.useState(!range ? min : max);
|
|
25
|
+
const handleChange = (v, type) => {
|
|
26
|
+
if (type === "max") {
|
|
27
|
+
setCurrentMax(v);
|
|
28
|
+
onChange == null ? void 0 : onChange([Array.isArray(value) && value.length === 2 ? value[0] : min, v]);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (!range) {
|
|
32
|
+
setCurrentMax(v);
|
|
33
|
+
if (onChange) onChange(v);
|
|
34
|
+
} else {
|
|
35
|
+
v = v < min ? min : v;
|
|
36
|
+
setCurrentMin(v);
|
|
37
|
+
if (onChange) {
|
|
38
|
+
const changeValue = [v, Array.isArray(value) && value.length === 2 ? value[1] : max];
|
|
39
|
+
onChange(changeValue);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const handleFocus = () => {
|
|
44
|
+
setFocused(true);
|
|
45
|
+
};
|
|
46
|
+
const handleBlur = () => {
|
|
47
|
+
setFocused(false);
|
|
48
|
+
};
|
|
49
|
+
const handleMin = (e) => {
|
|
50
|
+
let val = 0;
|
|
51
|
+
if (e.target.value) val = parseInt(e.target.value);
|
|
52
|
+
if (val > max) return;
|
|
53
|
+
handleChange(val, "min");
|
|
54
|
+
};
|
|
55
|
+
const handleMax = (e) => {
|
|
56
|
+
let val = max;
|
|
57
|
+
if (e.target.value) val = parseInt(e.target.value);
|
|
58
|
+
val = val > max ? max : val;
|
|
59
|
+
handleChange(val, "max");
|
|
60
|
+
};
|
|
61
|
+
let realMin = currentMin;
|
|
62
|
+
let realMax = currentMax;
|
|
63
|
+
if (value !== void 0 && Array.isArray(value) && value.length === 2) {
|
|
64
|
+
realMin = value[0];
|
|
65
|
+
realMax = value[1];
|
|
66
|
+
}
|
|
67
|
+
if (!range) realMin = value !== void 0 ? value : currentMax;
|
|
68
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "interval", children: [
|
|
69
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui_Form_TextField_TextField.TextFieldContainer, { focused, error, disabled, size: inputProps.size, variant: inputProps.variant, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "arm-interval", children: [
|
|
70
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "arm-interval__item", children: /* @__PURE__ */ jsxRuntime.jsx(ui_Form_TextField_TextField.TextFieldInput, { ...inputProps, "data-testid": "interval-input-min", value: realMin, label: labelStart, type: "text", onFocus: handleFocus, onBlur: handleBlur, focused: true, onChange: handleMin }) }),
|
|
71
|
+
range && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "arm-interval__item", children: /* @__PURE__ */ jsxRuntime.jsx(ui_Form_TextField_TextField.TextFieldInput, { ...inputProps, "data-testid": "interval-input-max", value: realMax, label: labelEnd, type: "text", onFocus: handleFocus, onBlur: handleBlur, className: "arm-interval__end", focused: true, onChange: handleMax }) })
|
|
72
|
+
] }) }),
|
|
73
|
+
helperText && /* @__PURE__ */ jsxRuntime.jsx(ui_HelperText_HelperText.default, { className: "arm-interval__helper", error, children: helperText })
|
|
74
|
+
] }) });
|
|
75
|
+
}
|
|
76
|
+
exports.default = Interval;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const ui_Form_Interval_Interval = require("./Interval.cjs");
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const ui_Slider_Slider = require("../../Slider/Slider.cjs");
|
|
7
|
+
function IntervalSlide(props) {
|
|
8
|
+
const {
|
|
9
|
+
onChange,
|
|
10
|
+
color,
|
|
11
|
+
step,
|
|
12
|
+
...restProps
|
|
13
|
+
} = props;
|
|
14
|
+
const defaultValue = restProps.defaultValue || (restProps.range ? [restProps.min, restProps.max] : restProps.min !== void 0 ? restProps.min : 0);
|
|
15
|
+
const [currentValue, setCurrentValue] = React.useState(defaultValue);
|
|
16
|
+
const handleChange = (value) => {
|
|
17
|
+
let newValue = value;
|
|
18
|
+
if (onChange) onChange(newValue);
|
|
19
|
+
};
|
|
20
|
+
const handleSlide = (value) => {
|
|
21
|
+
handleChange(value);
|
|
22
|
+
setCurrentValue(value);
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
25
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui_Form_Interval_Interval.default, { value: currentValue, ...restProps, onChange: handleSlide }),
|
|
26
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "arm-intervalslide__slider", children: /* @__PURE__ */ jsxRuntime.jsx(ui_Slider_Slider.default, { min: props.min, max: props.max, disabled: props.disabled, color, value: restProps.value !== void 0 ? restProps.value : currentValue, size: props.size, onChange: handleSlide, range: props.range, step }) })
|
|
27
|
+
] }) });
|
|
28
|
+
}
|
|
29
|
+
exports.default = IntervalSlide;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const ui_Form_Interval_Interval = require("./Interval.cjs");
|
|
4
|
+
const ui_Form_Interval_IntervalSlide = require("./IntervalSlide.cjs");
|
|
5
|
+
exports.default = ui_Form_Interval_Interval.default;
|
|
6
|
+
exports.IntervalSlide = ui_Form_Interval_IntervalSlide.default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const ui_Form_TextField_TextField = require("../TextField/TextField.cjs");
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const ui_ButtonIcon_ButtonIcon = require("../../ButtonIcon/ButtonIcon.cjs");
|
|
7
|
+
const Password = React.forwardRef((props, ref) => {
|
|
8
|
+
let {
|
|
9
|
+
onChange,
|
|
10
|
+
...restProps
|
|
11
|
+
} = props;
|
|
12
|
+
let [value, setValue] = React.useState("");
|
|
13
|
+
let [isPassword, setIsPassword] = React.useState(true);
|
|
14
|
+
const inputRef = React.useRef(ref);
|
|
15
|
+
const handleChange = (e) => {
|
|
16
|
+
setValue(e.target.value);
|
|
17
|
+
if (onChange) onChange(e);
|
|
18
|
+
};
|
|
19
|
+
const handleClick = () => {
|
|
20
|
+
setIsPassword((prev) => !prev);
|
|
21
|
+
};
|
|
22
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(ui_Form_TextField_TextField.TextField, { value, ref: inputRef, ...restProps, type: isPassword ? "password" : "text", onChange: handleChange, endAdornment: /* @__PURE__ */ jsxRuntime.jsx(ui_ButtonIcon_ButtonIcon.default, { size: "medium", variant: "transparent", color: "neutral", onClick: handleClick, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "material_icon", children: isPassword ? "visibility_off" : "visibility" }) }) }) });
|
|
23
|
+
});
|
|
24
|
+
exports.Password = Password;
|
|
25
|
+
exports.default = Password;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const Password: import("react").ForwardRefExoticComponent<{
|
|
2
|
+
label?: string;
|
|
3
|
+
size?: Exclude<import("../../../types/theme").SizeType, "extraLarge" | "medium">;
|
|
4
|
+
variant?: import("../../../types/theme").VariantType;
|
|
5
|
+
error?: boolean;
|
|
6
|
+
errorTooltip?: string;
|
|
7
|
+
success?: boolean;
|
|
8
|
+
helperText?: string | import("react").ReactNode;
|
|
9
|
+
endAdornment?: string | import("react").ReactNode;
|
|
10
|
+
multiline?: boolean;
|
|
11
|
+
focused?: boolean;
|
|
12
|
+
editable?: boolean;
|
|
13
|
+
classes?: Partial<{
|
|
14
|
+
input: string;
|
|
15
|
+
root: string;
|
|
16
|
+
wrapper: string;
|
|
17
|
+
}>;
|
|
18
|
+
WrapperProps?: import("react").ComponentPropsWithoutRef<"div">;
|
|
19
|
+
} & Omit<import("react").InputHTMLAttributes<any>, "size"> & import("react").RefAttributes<unknown>>;
|
|
20
|
+
export default Password;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const ui_Form_TextField_TextField = require("../TextField/TextField.cjs");
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const ui_ButtonIcon_ButtonIcon = require("../../ButtonIcon/ButtonIcon.cjs");
|
|
7
|
+
const ui_Card_Card = require("../../Card/Card.cjs");
|
|
8
|
+
const ui_Form_DatePicker_DatePicker = require("../DatePicker/DatePicker.cjs");
|
|
9
|
+
const lib_services_DateService = require("../../../lib/services/DateService.cjs");
|
|
10
|
+
const ui_Adornment_Adornment = require("../../Adornment/Adornment.cjs");
|
|
11
|
+
const ui_Popper_Popper = require("../../Popper/Popper.cjs");
|
|
12
|
+
require("@popperjs/core");
|
|
13
|
+
require("clsx");
|
|
14
|
+
const DELIMITER = " - ";
|
|
15
|
+
const format = "dd.MM.yyyy";
|
|
16
|
+
function getPeriodDisplay(date1, date2) {
|
|
17
|
+
if (date1 && date2) return lib_services_DateService.DateService(date1).format(format) + DELIMITER + lib_services_DateService.DateService(date2).format(format);
|
|
18
|
+
return "";
|
|
19
|
+
}
|
|
20
|
+
function validateDate(date, minDate, maxDate) {
|
|
21
|
+
const startParts = date.split(".");
|
|
22
|
+
const startTimeStamp = Date.parse(`${startParts[2]}-${startParts[1]}-${startParts[0]}`);
|
|
23
|
+
if (isNaN(startTimeStamp) === false) {
|
|
24
|
+
const startDate = new Date(startTimeStamp);
|
|
25
|
+
if (minDate && lib_services_DateService.isDateBigger(minDate, startDate)) return null;
|
|
26
|
+
else if (maxDate && lib_services_DateService.isDateBigger(startDate, maxDate)) return null;
|
|
27
|
+
return startDate;
|
|
28
|
+
}
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
const Period = React.forwardRef((props, ref) => {
|
|
32
|
+
const {
|
|
33
|
+
onChange,
|
|
34
|
+
onInput,
|
|
35
|
+
maxDate,
|
|
36
|
+
minDate,
|
|
37
|
+
disableSameDate,
|
|
38
|
+
value,
|
|
39
|
+
defaultValue,
|
|
40
|
+
showYearDropdown,
|
|
41
|
+
showMonthDropdown,
|
|
42
|
+
datePickerProps,
|
|
43
|
+
disabled,
|
|
44
|
+
...restProps
|
|
45
|
+
} = props;
|
|
46
|
+
const [active, setActive] = React.useState(false);
|
|
47
|
+
const [currentValue, setCurrentValue] = React.useState(defaultValue || [null, null]);
|
|
48
|
+
const displayText = defaultValue ? getPeriodDisplay(defaultValue[0], defaultValue[1]) : "";
|
|
49
|
+
const [textValue, setTextValue] = React.useState(displayText);
|
|
50
|
+
const btnRef = React.useRef();
|
|
51
|
+
const [startValue, endValue] = value || [];
|
|
52
|
+
React.useEffect(() => {
|
|
53
|
+
if (startValue && endValue) setTextValue(getPeriodDisplay(startValue, endValue));
|
|
54
|
+
else if (startValue === null && endValue === null) setTextValue("");
|
|
55
|
+
}, [startValue, endValue]);
|
|
56
|
+
const handleClick = (e) => {
|
|
57
|
+
e.stopPropagation();
|
|
58
|
+
setActive((prev) => !prev);
|
|
59
|
+
};
|
|
60
|
+
const handleSelect = (date) => {
|
|
61
|
+
if (disabled) return;
|
|
62
|
+
if (date[0] && date[1] && disableSameDate && lib_services_DateService.isDateEqual(date[0], date[1])) {
|
|
63
|
+
setTextValue("");
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
setCurrentValue(date);
|
|
67
|
+
if (date[0] && date[1]) setTextValue(getPeriodDisplay(date[0], date[1]));
|
|
68
|
+
if (date[0] && date[1]) setActive(false);
|
|
69
|
+
if (onChange) {
|
|
70
|
+
const e = new Event("input", {
|
|
71
|
+
bubbles: true
|
|
72
|
+
});
|
|
73
|
+
Object.defineProperty(e, "target", {
|
|
74
|
+
writable: false,
|
|
75
|
+
value: {
|
|
76
|
+
name: props.name,
|
|
77
|
+
value: date
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
onChange(e);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
const handleChange = (e) => {
|
|
84
|
+
if (disabled) return;
|
|
85
|
+
let value2 = e.target.value;
|
|
86
|
+
const bs = (textValue.endsWith(".") || textValue.endsWith(" ") || textValue.endsWith("-")) && textValue.length > value2.length;
|
|
87
|
+
if (!bs) {
|
|
88
|
+
value2 = value2.replace(/[^\d -.]/g, "").replace(/^(\d{2})$/, "$1.").replace(/^(\d{2})(\d)$/, "$1.$2").replace(/^(\d{2})\.(\d{2})$/, "$1.$2.").replace(/^(\d{2})\.(\d{2})(\d)$/, "$1.$2.$3").replace(/^(\d{2})\.(\d{2})\.(\d{4})$/, "$1.$2.$3" + DELIMITER).replace(new RegExp(`^(\\d{2}).(\\d{2}).(\\d{4})${DELIMITER}(\\d{2})$`), `$1.$2.$3${DELIMITER}$4.`).replace(new RegExp(`^(\\d{2}).(\\d{2}).(\\d{4})${DELIMITER}(\\d{2})(d)$`), `$1.$2.$3${DELIMITER}$4.$5`).replace(new RegExp(`^(\\d{2}).(\\d{2}).(\\d{4})${DELIMITER}(\\d{2}).(\\d{2})$`), "$1.$2.$3 - $4.$5.").replace(new RegExp(`^(\\d{2}).(\\d{2}).(\\d{4})${DELIMITER}(\\d{2}).(\\d{2})(d)$`), "$1.$2.$3 - $4.$5.$6").replace(new RegExp(`^(\\d{2}).(\\d{2}).(\\d{4})${DELIMITER}(\\d{2}).(\\d{2}).(\\d{4})$`), "$1.$2.$3 - $4.$5.$6").replace(new RegExp(`^(\\d{2}).(\\d{2}).(\\d{4})${DELIMITER}(\\d{2}).(\\d{2}).(\\d{4})(\\d)$`), "$1.$2.$3 - $4.$5.$6");
|
|
89
|
+
}
|
|
90
|
+
let startDateValid = null;
|
|
91
|
+
let endDateValid = null;
|
|
92
|
+
const valueParts = value2.split(DELIMITER);
|
|
93
|
+
if (valueParts[0].match(/^\d{2}\.\d{2}\.\d{4}$/)) {
|
|
94
|
+
startDateValid = validateDate(valueParts[0], minDate, maxDate);
|
|
95
|
+
if (!startDateValid) {
|
|
96
|
+
setTextValue("");
|
|
97
|
+
handleSelect([null, null]);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
setTextValue(value2);
|
|
102
|
+
setCurrentValue([null, null]);
|
|
103
|
+
if (value2.match(new RegExp(`\\d{2}\\.\\d{2}\\.\\d{4}${DELIMITER}\\d{2}\\.\\d{2}\\.\\d{4}`))) {
|
|
104
|
+
if (valueParts.length === 2) {
|
|
105
|
+
endDateValid = validateDate(valueParts[1], minDate, maxDate);
|
|
106
|
+
if (!endDateValid) {
|
|
107
|
+
setTextValue("");
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (startDateValid && endDateValid && startDateValid.getTime() <= endDateValid.getTime()) {
|
|
112
|
+
handleSelect([startDateValid, endDateValid]);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
const handleBlur = (e) => {
|
|
116
|
+
setActive(false);
|
|
117
|
+
const value2 = e.target.value;
|
|
118
|
+
const valueParts = value2.split(DELIMITER);
|
|
119
|
+
const startDateValid = valueParts[0] ? validateDate(valueParts[0], minDate, maxDate) : null;
|
|
120
|
+
const endDateValid = valueParts[1] ? validateDate(valueParts[1], minDate, maxDate) : null;
|
|
121
|
+
if (!startDateValid || !endDateValid || startDateValid && endDateValid && endDateValid.getTime() < startDateValid.getTime()) {
|
|
122
|
+
setTextValue("");
|
|
123
|
+
handleSelect([null, null]);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
const handleClickOutside = (e) => {
|
|
127
|
+
if (!e.target.closest("[data-calendar-btn]") && !e.target.closest(".arm-datepicker__select-option")) setActive(false);
|
|
128
|
+
};
|
|
129
|
+
let realValue = Array.isArray(props.value) ? props.value : currentValue;
|
|
130
|
+
const endAdornment = /* @__PURE__ */ jsxRuntime.jsxs(ui_Adornment_Adornment.AdornmentContainer, { children: [
|
|
131
|
+
restProps.endAdornment,
|
|
132
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui_ButtonIcon_ButtonIcon.default, { "data-calendar-btn": true, size: "medium", "data-testid": "period-btn", variant: "transparent", color: "neutral", disabled, onClick: handleClick, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "material_icon", ref: btnRef, children: "calendar_today" }) })
|
|
133
|
+
] });
|
|
134
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "arm-period", "data-testid": "period", children: [
|
|
135
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui_Form_TextField_TextField.TextField, { ref, placeholder: "дд.мм.гггг - дд.мм.гггг", ...restProps, disabled, value: textValue, onBlur: handleBlur, onChange: handleChange, onFocus: () => setActive(false), autoComplete: "off", endAdornment }),
|
|
136
|
+
active && /* @__PURE__ */ jsxRuntime.jsx(ui_Popper_Popper.Popper, { anchorEl: btnRef.current, open: active, placement: "bottom-end", children: /* @__PURE__ */ jsxRuntime.jsx(ui_Card_Card.default, { className: "arm-period__picker", "data-testid": "period_card", children: /* @__PURE__ */ jsxRuntime.jsx(ui_Form_DatePicker_DatePicker.default, { onClickOutside: handleClickOutside, onChange: handleSelect, selectsRange: true, selected: realValue[0], startDate: realValue[0], endDate: realValue[1], minDate: minDate || void 0, maxDate: maxDate || void 0, showMonthDropdown, showYearDropdown, ...datePickerProps }) }) })
|
|
137
|
+
] }) });
|
|
138
|
+
});
|
|
139
|
+
exports.default = Period;
|
|
140
|
+
exports.getPeriodDisplay = getPeriodDisplay;
|