@ncds/ui-admin 1.6.4 → 1.7.0
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/dist/cjs/assets/scripts/baseBox.js +148 -0
- package/dist/cjs/assets/scripts/comboBox.js +44 -136
- package/dist/cjs/assets/scripts/datePicker.js +1 -1
- package/dist/cjs/assets/scripts/featuredIcon.js +1 -1
- package/dist/cjs/assets/scripts/fileInput/const/classNames.js +1 -5
- package/dist/cjs/assets/scripts/fileInput/fileInput.js +79 -0
- package/dist/cjs/assets/scripts/fileInput/fileInputModel.js +61 -0
- package/dist/cjs/assets/scripts/fileInput/fileInputView.js +147 -0
- package/dist/cjs/assets/scripts/fileInput/index.js +3 -3
- package/dist/cjs/assets/scripts/imageFileInput/ImageFileInputView.js +1 -1
- package/dist/cjs/assets/scripts/selectBox.js +46 -136
- package/dist/cjs/assets/scripts/utils/debounce.js +33 -0
- package/dist/cjs/assets/scripts/utils/unifiedBox/{DropdownModel.js → dropdownModel.js} +21 -63
- package/dist/cjs/assets/scripts/utils/unifiedBox/{UnifiedBoxController.js → unifiedBoxController.js} +11 -43
- package/dist/cjs/assets/scripts/utils/unifiedBox/{UnifiedBoxManager.js → unifiedBoxManager.js} +59 -101
- package/dist/cjs/src/components/badge/Badge.js +1 -1
- package/dist/cjs/src/components/breadcrumb/BreadCrumb.js +1 -1
- package/dist/cjs/src/components/button/Button.js +13 -5
- package/dist/cjs/src/components/button/ButtonGroup.js +1 -2
- package/dist/cjs/src/components/carousel/CarouselArrow.js +2 -2
- package/dist/cjs/src/components/carousel/CarouselNumberGroup.js +4 -5
- package/dist/cjs/src/components/checkbox/CheckboxInput.js +1 -1
- package/dist/cjs/src/components/combobox/ComboBox.js +54 -43
- package/dist/cjs/src/components/date-picker/CustomInput.js +3 -1
- package/dist/cjs/src/components/date-picker/DatePicker.js +85 -65
- package/dist/cjs/src/components/date-picker/RangeDatePicker.js +46 -37
- package/dist/cjs/src/components/divider/Divider.js +1 -1
- package/dist/cjs/src/components/dot/Dot.js +1 -1
- package/dist/cjs/src/components/dropdown/Dropdown.js +3 -2
- package/dist/cjs/src/components/featured-icon/FeaturedIcon.js +1 -1
- package/dist/cjs/src/components/file-input/FileInput.js +3 -3
- package/dist/cjs/src/components/image-file-input/ImageFileInput.js +5 -2
- package/dist/cjs/src/components/input/NumberInput.js +1 -1
- package/dist/cjs/src/components/notification/index.js +11 -11
- package/dist/cjs/src/components/pagination/NavButton.js +3 -1
- package/dist/cjs/src/components/pagination/Pagination.js +65 -67
- package/dist/cjs/src/components/progress-bar/ProgressBar.js +13 -9
- package/dist/cjs/src/components/progress-bar/components/SegmentBar.js +1 -1
- package/dist/cjs/src/components/progress-bar/components/SegmentLabels.js +1 -1
- package/dist/cjs/src/components/progress-bar/hooks/useProgressBar.js +3 -2
- package/dist/cjs/src/components/progress-bar/utils.js +3 -2
- package/dist/cjs/src/components/progress-circle/ProgressCircle.js +41 -41
- package/dist/cjs/src/components/select/Select.js +2 -2
- package/dist/cjs/src/components/selectbox/SelectBox.js +57 -45
- package/dist/cjs/src/components/spinner/Spinner.js +5 -4
- package/dist/cjs/src/components/spinner/index.js +0 -11
- package/dist/cjs/src/components/switch/Switch.js +15 -10
- package/dist/cjs/src/components/tab/HorizontalTab.js +5 -3
- package/dist/cjs/src/components/tab/TabButton.js +1 -1
- package/dist/cjs/src/components/toggle/Toggle.js +13 -15
- package/dist/cjs/src/components/tooltip/Tooltip.js +28 -13
- package/dist/cjs/src/constant/index.js +8 -8
- package/dist/cjs/src/hooks/dropdown/useDropdownKeyboard.js +47 -56
- package/dist/cjs/src/hooks/dropdown/useScrollLock.js +26 -19
- package/dist/cjs/src/hooks/index.js +4 -4
- package/dist/cjs/src/utils/date-picker.js +14 -7
- package/dist/cjs/src/utils/dropdown/dropdownUtils.js +6 -8
- package/dist/esm/assets/scripts/baseBox.js +143 -0
- package/dist/esm/assets/scripts/comboBox.js +44 -136
- package/dist/esm/assets/scripts/datePicker.js +1 -1
- package/dist/esm/assets/scripts/featuredIcon.js +1 -1
- package/dist/esm/assets/scripts/fileInput/const/classNames.js +0 -3
- package/dist/esm/assets/scripts/fileInput/fileInput.js +74 -0
- package/dist/esm/assets/scripts/fileInput/fileInputModel.js +56 -0
- package/dist/esm/assets/scripts/fileInput/fileInputView.js +142 -0
- package/dist/esm/assets/scripts/fileInput/index.js +2 -2
- package/dist/esm/assets/scripts/imageFileInput/ImageFileInputView.js +2 -2
- package/dist/esm/assets/scripts/selectBox.js +46 -136
- package/dist/esm/assets/scripts/utils/debounce.js +27 -0
- package/dist/esm/assets/scripts/utils/unifiedBox/{DropdownModel.js → dropdownModel.js} +23 -66
- package/dist/esm/assets/scripts/utils/unifiedBox/{UnifiedBoxController.js → unifiedBoxController.js} +11 -43
- package/dist/esm/assets/scripts/utils/unifiedBox/{UnifiedBoxManager.js → unifiedBoxManager.js} +53 -95
- package/dist/esm/src/components/badge/Badge.js +4 -3
- package/dist/esm/src/components/badge/BadgeGroup.js +3 -2
- package/dist/esm/src/components/badge/utils.js +3 -2
- package/dist/esm/src/components/breadcrumb/BreadCrumb.js +4 -3
- package/dist/esm/src/components/button/Button.js +13 -5
- package/dist/esm/src/components/button/ButtonCloseX.js +3 -2
- package/dist/esm/src/components/button/ButtonGroup.js +3 -2
- package/dist/esm/src/components/carousel/CarouselArrow.js +2 -2
- package/dist/esm/src/components/carousel/CarouselNumberGroup.js +4 -5
- package/dist/esm/src/components/checkbox/CheckboxInput.js +1 -1
- package/dist/esm/src/components/combobox/ComboBox.js +58 -46
- package/dist/esm/src/components/date-picker/CustomInput.js +6 -3
- package/dist/esm/src/components/date-picker/DatePicker.js +88 -67
- package/dist/esm/src/components/date-picker/RangeDatePicker.js +49 -39
- package/dist/esm/src/components/date-picker/RangeDatePickerWithButtons.js +3 -2
- package/dist/esm/src/components/divider/Divider.js +1 -1
- package/dist/esm/src/components/dot/Dot.js +4 -3
- package/dist/esm/src/components/dropdown/Dropdown.js +3 -2
- package/dist/esm/src/components/empty-state/EmptyState.js +3 -2
- package/dist/esm/src/components/featured-icon/FeaturedIcon.js +4 -3
- package/dist/esm/src/components/file-input/FileInput.js +3 -3
- package/dist/esm/src/components/image-file-input/ImageFileInput.js +6 -3
- package/dist/esm/src/components/input/InputBase.js +3 -2
- package/dist/esm/src/components/input/NumberInput.js +1 -1
- package/dist/esm/src/components/modal/Modal.js +3 -2
- package/dist/esm/src/components/notification/FloatingNotification.js +3 -2
- package/dist/esm/src/components/notification/FullWidthNotification.js +3 -2
- package/dist/esm/src/components/notification/MessageNotification.js +3 -2
- package/dist/esm/src/components/notification/Notification.js +3 -2
- package/dist/esm/src/components/notification/index.js +2 -2
- package/dist/esm/src/components/pagination/NavButton.js +3 -1
- package/dist/esm/src/components/pagination/Pagination.js +65 -67
- package/dist/esm/src/components/progress-bar/ProgressBar.js +13 -9
- package/dist/esm/src/components/progress-bar/components/SegmentBar.js +1 -1
- package/dist/esm/src/components/progress-bar/components/SegmentLabels.js +5 -4
- package/dist/esm/src/components/progress-bar/hooks/useProgressBar.js +3 -2
- package/dist/esm/src/components/progress-bar/utils.js +7 -5
- package/dist/esm/src/components/progress-circle/ProgressCircle.js +41 -41
- package/dist/esm/src/components/select/Select.js +2 -2
- package/dist/esm/src/components/select-dropdown/SelectDropdown.js +3 -2
- package/dist/esm/src/components/selectbox/SelectBox.js +61 -48
- package/dist/esm/src/components/spinner/Spinner.js +5 -4
- package/dist/esm/src/components/spinner/index.js +1 -2
- package/dist/esm/src/components/switch/Switch.js +19 -13
- package/dist/esm/src/components/tab/HorizontalTab.js +9 -6
- package/dist/esm/src/components/tab/TabButton.js +4 -3
- package/dist/esm/src/components/tag/Tag.js +3 -2
- package/dist/esm/src/components/toggle/Toggle.js +14 -16
- package/dist/esm/src/components/tooltip/Tooltip.js +29 -14
- package/dist/esm/src/constant/index.js +2 -2
- package/dist/esm/src/hooks/dropdown/useDropdownKeyboard.js +47 -56
- package/dist/esm/src/hooks/dropdown/useScrollLock.js +26 -19
- package/dist/esm/src/hooks/index.js +3 -3
- package/dist/esm/src/utils/date-picker.js +14 -7
- package/dist/esm/src/utils/dropdown/dropdownUtils.js +6 -8
- package/dist/temp/assets/scripts/baseBox.d.ts +55 -0
- package/dist/temp/assets/scripts/baseBox.js +144 -0
- package/dist/temp/assets/scripts/comboBox.d.ts +60 -0
- package/dist/temp/assets/scripts/comboBox.js +163 -0
- package/dist/temp/assets/scripts/datePicker.d.ts +86 -0
- package/dist/temp/assets/scripts/datePicker.js +706 -0
- package/dist/temp/assets/scripts/featuredIcon.d.ts +22 -0
- package/dist/temp/assets/scripts/featuredIcon.js +86 -0
- package/dist/temp/assets/scripts/fileInput/const/classNames.d.ts +15 -0
- package/dist/temp/assets/scripts/fileInput/const/classNames.js +20 -0
- package/dist/temp/assets/scripts/fileInput/const/index.d.ts +2 -0
- package/dist/temp/assets/scripts/fileInput/const/index.js +2 -0
- package/dist/temp/assets/scripts/fileInput/const/types.d.ts +88 -0
- package/dist/temp/assets/scripts/fileInput/const/types.js +7 -0
- package/dist/temp/assets/scripts/fileInput/fileInput.d.ts +13 -0
- package/dist/temp/assets/scripts/fileInput/fileInput.js +75 -0
- package/dist/temp/assets/scripts/fileInput/fileInputModel.d.ts +12 -0
- package/dist/temp/assets/scripts/fileInput/fileInputModel.js +45 -0
- package/dist/temp/assets/scripts/fileInput/fileInputView.d.ts +42 -0
- package/dist/temp/assets/scripts/fileInput/fileInputView.js +142 -0
- package/dist/temp/assets/scripts/fileInput/index.d.ts +3 -0
- package/dist/temp/assets/scripts/fileInput/index.js +9 -0
- package/dist/{types/assets/scripts/fileInput/FileInput.d.ts → temp/assets/scripts/imageFileInput/ImageFileInput.d.ts} +6 -10
- package/dist/temp/assets/scripts/imageFileInput/ImageFileInput.js +186 -0
- package/dist/{types/assets/scripts/fileInput/FileInputModel.d.ts → temp/assets/scripts/imageFileInput/ImageFileInputModel.d.ts} +8 -5
- package/dist/temp/assets/scripts/imageFileInput/ImageFileInputModel.js +234 -0
- package/dist/{types/assets/scripts/fileInput/FileInputView.d.ts → temp/assets/scripts/imageFileInput/ImageFileInputView.d.ts} +27 -25
- package/dist/temp/assets/scripts/imageFileInput/ImageFileInputView.js +348 -0
- package/dist/temp/assets/scripts/imageFileInput/const/classNames.d.ts +19 -0
- package/dist/temp/assets/scripts/imageFileInput/const/classNames.js +24 -0
- package/dist/temp/assets/scripts/imageFileInput/const/index.d.ts +2 -0
- package/dist/temp/assets/scripts/imageFileInput/const/index.js +2 -0
- package/dist/temp/assets/scripts/imageFileInput/const/types.d.ts +125 -0
- package/dist/temp/assets/scripts/imageFileInput/const/types.js +7 -0
- package/dist/temp/assets/scripts/imageFileInput/index.d.ts +3 -0
- package/dist/temp/assets/scripts/imageFileInput/index.js +9 -0
- package/dist/temp/assets/scripts/index.d.ts +32 -0
- package/dist/temp/assets/scripts/index.js +28 -0
- package/dist/temp/assets/scripts/modal/Modal.d.ts +27 -0
- package/dist/temp/assets/scripts/modal/Modal.js +106 -0
- package/dist/temp/assets/scripts/modal/ModalActions.d.ts +18 -0
- package/dist/temp/assets/scripts/modal/ModalActions.js +125 -0
- package/dist/temp/assets/scripts/modal/ModalContent.d.ts +13 -0
- package/dist/temp/assets/scripts/modal/ModalContent.js +41 -0
- package/dist/temp/assets/scripts/modal/ModalHeader.d.ts +15 -0
- package/dist/temp/assets/scripts/modal/ModalHeader.js +102 -0
- package/dist/temp/assets/scripts/modal/const/classNames.d.ts +22 -0
- package/dist/temp/assets/scripts/modal/const/classNames.js +23 -0
- package/dist/temp/assets/scripts/modal/const/index.d.ts +2 -0
- package/dist/temp/assets/scripts/modal/const/index.js +2 -0
- package/dist/temp/assets/scripts/modal/const/types.d.ts +61 -0
- package/dist/temp/assets/scripts/modal/const/types.js +1 -0
- package/dist/temp/assets/scripts/modal/index.d.ts +7 -0
- package/dist/temp/assets/scripts/modal/index.js +15 -0
- package/dist/temp/assets/scripts/modal/utils/contentUtils.d.ts +10 -0
- package/dist/temp/assets/scripts/modal/utils/contentUtils.js +29 -0
- package/dist/temp/assets/scripts/notification/FloatingNotification.d.ts +24 -0
- package/dist/temp/assets/scripts/notification/FloatingNotification.js +154 -0
- package/dist/temp/assets/scripts/notification/FullWidthNotification.d.ts +21 -0
- package/dist/temp/assets/scripts/notification/FullWidthNotification.js +94 -0
- package/dist/temp/assets/scripts/notification/MessageNotification.d.ts +22 -0
- package/dist/temp/assets/scripts/notification/MessageNotification.js +123 -0
- package/dist/temp/assets/scripts/notification/Notification.d.ts +21 -0
- package/dist/temp/assets/scripts/notification/Notification.js +108 -0
- package/dist/temp/assets/scripts/notification/const/classNames.d.ts +43 -0
- package/dist/temp/assets/scripts/notification/const/classNames.js +44 -0
- package/dist/temp/assets/scripts/notification/const/icons.d.ts +25 -0
- package/dist/temp/assets/scripts/notification/const/icons.js +39 -0
- package/dist/temp/assets/scripts/notification/const/index.d.ts +5 -0
- package/dist/temp/assets/scripts/notification/const/index.js +4 -0
- package/dist/temp/assets/scripts/notification/const/sizes.d.ts +32 -0
- package/dist/temp/assets/scripts/notification/const/sizes.js +40 -0
- package/dist/temp/assets/scripts/notification/const/types.d.ts +19 -0
- package/dist/temp/assets/scripts/notification/const/types.js +8 -0
- package/dist/temp/assets/scripts/notification/index.d.ts +7 -0
- package/dist/temp/assets/scripts/notification/index.js +11 -0
- package/dist/temp/assets/scripts/notification/utils.d.ts +8 -0
- package/dist/temp/assets/scripts/notification/utils.js +84 -0
- package/dist/temp/assets/scripts/progress-bar/ProgressBar.d.ts +67 -0
- package/dist/temp/assets/scripts/progress-bar/ProgressBar.js +258 -0
- package/dist/temp/assets/scripts/progress-bar/index.d.ts +1 -0
- package/dist/temp/assets/scripts/progress-bar/index.js +1 -0
- package/dist/temp/assets/scripts/selectBox.d.ts +50 -0
- package/dist/temp/assets/scripts/selectBox.js +194 -0
- package/dist/temp/assets/scripts/shared/ButtonCloseX.d.ts +5 -0
- package/dist/temp/assets/scripts/shared/ButtonCloseX.js +32 -0
- package/dist/temp/assets/scripts/slider.d.ts +41 -0
- package/dist/temp/assets/scripts/slider.js +331 -0
- package/dist/temp/assets/scripts/tab.d.ts +7 -0
- package/dist/temp/assets/scripts/tab.js +35 -0
- package/dist/temp/assets/scripts/tag/Tag.d.ts +27 -0
- package/dist/temp/assets/scripts/tag/Tag.js +267 -0
- package/dist/temp/assets/scripts/tag/const/classNames.d.ts +11 -0
- package/dist/temp/assets/scripts/tag/const/classNames.js +12 -0
- package/dist/temp/assets/scripts/tag/const/index.d.ts +3 -0
- package/dist/temp/assets/scripts/tag/const/index.js +3 -0
- package/dist/temp/assets/scripts/tag/const/sizes.d.ts +7 -0
- package/dist/temp/assets/scripts/tag/const/sizes.js +7 -0
- package/dist/temp/assets/scripts/tag/const/types.d.ts +33 -0
- package/dist/temp/assets/scripts/tag/const/types.js +1 -0
- package/dist/temp/assets/scripts/tag/index.d.ts +3 -0
- package/dist/temp/assets/scripts/tag/index.js +9 -0
- package/dist/temp/assets/scripts/tooltip/Tooltip.d.ts +54 -0
- package/dist/temp/assets/scripts/tooltip/Tooltip.js +360 -0
- package/dist/temp/assets/scripts/tooltip/TooltipLayerManager.d.ts +21 -0
- package/dist/temp/assets/scripts/tooltip/TooltipLayerManager.js +74 -0
- package/dist/temp/assets/scripts/tooltip/const/classNames.d.ts +17 -0
- package/dist/temp/assets/scripts/tooltip/const/classNames.js +23 -0
- package/dist/temp/assets/scripts/tooltip/const/constants.d.ts +33 -0
- package/dist/temp/assets/scripts/tooltip/const/constants.js +46 -0
- package/dist/temp/assets/scripts/tooltip/const/icons.d.ts +4 -0
- package/dist/temp/assets/scripts/tooltip/const/icons.js +9 -0
- package/dist/temp/assets/scripts/tooltip/const/index.d.ts +5 -0
- package/dist/temp/assets/scripts/tooltip/const/index.js +4 -0
- package/dist/temp/assets/scripts/tooltip/const/templates.d.ts +16 -0
- package/dist/temp/assets/scripts/tooltip/const/templates.js +30 -0
- package/dist/temp/assets/scripts/tooltip/const/types.d.ts +14 -0
- package/dist/temp/assets/scripts/tooltip/const/types.js +1 -0
- package/dist/temp/assets/scripts/tooltip/index.d.ts +6 -0
- package/dist/temp/assets/scripts/tooltip/index.js +10 -0
- package/dist/temp/assets/scripts/tooltip/utils.d.ts +2 -0
- package/dist/temp/assets/scripts/tooltip/utils.js +35 -0
- package/dist/temp/assets/scripts/utils/debounce.d.ts +8 -0
- package/dist/temp/assets/scripts/utils/debounce.js +27 -0
- package/dist/{types/assets/scripts/utils/unifiedBox/DOMRenderer.d.ts → temp/assets/scripts/utils/unifiedBox/domRenderer.d.ts} +0 -1
- package/dist/temp/assets/scripts/utils/unifiedBox/domRenderer.js +376 -0
- package/dist/{types/assets/scripts/utils/unifiedBox/DropdownModel.d.ts → temp/assets/scripts/utils/unifiedBox/dropdownModel.d.ts} +7 -23
- package/dist/temp/assets/scripts/utils/unifiedBox/dropdownModel.js +311 -0
- package/dist/{types/assets/scripts/utils/unifiedBox/UnifiedBoxController.d.ts → temp/assets/scripts/utils/unifiedBox/unifiedBoxController.d.ts} +3 -18
- package/dist/temp/assets/scripts/utils/unifiedBox/unifiedBoxController.js +627 -0
- package/dist/{types/assets/scripts/utils/unifiedBox/UnifiedBoxManager.d.ts → temp/assets/scripts/utils/unifiedBox/unifiedBoxManager.d.ts} +4 -8
- package/dist/temp/assets/scripts/utils/unifiedBox/unifiedBoxManager.js +559 -0
- package/dist/temp/constant/color.d.ts +36 -0
- package/dist/temp/constant/color.js +34 -0
- package/dist/temp/constant/size.d.ts +1 -0
- package/dist/temp/constant/size.js +1 -0
- package/dist/temp/index.d.ts +29 -0
- package/dist/temp/index.js +29 -0
- package/dist/temp/src/components/badge/Badge.d.ts +18 -0
- package/dist/temp/src/components/badge/Badge.js +23 -0
- package/dist/temp/src/components/badge/BadgeGroup.d.ts +18 -0
- package/dist/temp/src/components/badge/BadgeGroup.js +36 -0
- package/dist/temp/src/components/badge/index.d.ts +2 -0
- package/dist/temp/src/components/badge/index.js +2 -0
- package/dist/temp/src/components/badge/utils.d.ts +8 -0
- package/dist/temp/src/components/badge/utils.js +17 -0
- package/dist/temp/src/components/breadcrumb/BreadCrumb.d.ts +11 -0
- package/dist/temp/src/components/breadcrumb/BreadCrumb.js +33 -0
- package/dist/temp/src/components/breadcrumb/index.d.ts +1 -0
- package/dist/temp/src/components/breadcrumb/index.js +1 -0
- package/dist/temp/src/components/button/Button.d.ts +35 -0
- package/dist/temp/src/components/button/Button.js +69 -0
- package/dist/temp/src/components/button/ButtonCloseX.d.ts +10 -0
- package/dist/temp/src/components/button/ButtonCloseX.js +25 -0
- package/dist/temp/src/components/button/ButtonGroup.d.ts +311 -0
- package/dist/temp/src/components/button/ButtonGroup.js +72 -0
- package/dist/temp/src/components/button/ButtonStepper.d.ts +9 -0
- package/dist/temp/src/components/button/ButtonStepper.js +6 -0
- package/dist/temp/src/components/button/index.d.ts +4 -0
- package/dist/temp/src/components/button/index.js +4 -0
- package/dist/temp/src/components/carousel/CarouselArrow.d.ts +8 -0
- package/dist/temp/src/components/carousel/CarouselArrow.js +24 -0
- package/dist/temp/src/components/carousel/CarouselNumberGroup.d.ts +8 -0
- package/dist/temp/src/components/carousel/CarouselNumberGroup.js +24 -0
- package/dist/temp/src/components/carousel/index.d.ts +2 -0
- package/dist/temp/src/components/carousel/index.js +2 -0
- package/dist/temp/src/components/checkbox/Checkbox.d.ts +7 -0
- package/dist/temp/src/components/checkbox/Checkbox.js +30 -0
- package/dist/temp/src/components/checkbox/CheckboxInput.d.ts +9 -0
- package/dist/temp/src/components/checkbox/CheckboxInput.js +46 -0
- package/dist/temp/src/components/checkbox/index.d.ts +2 -0
- package/dist/temp/src/components/checkbox/index.js +2 -0
- package/dist/temp/src/components/combobox/ComboBox.d.ts +28 -0
- package/dist/temp/src/components/combobox/ComboBox.js +199 -0
- package/dist/temp/src/components/combobox/index.d.ts +2 -0
- package/dist/temp/src/components/combobox/index.js +1 -0
- package/dist/temp/src/components/date-picker/CustomInput.d.ts +10 -0
- package/dist/temp/src/components/date-picker/CustomInput.js +34 -0
- package/dist/temp/src/components/date-picker/DatePicker.d.ts +24 -0
- package/dist/temp/src/components/date-picker/DatePicker.js +326 -0
- package/dist/temp/src/components/date-picker/RangeDatePicker.d.ts +26 -0
- package/dist/temp/src/components/date-picker/RangeDatePicker.js +117 -0
- package/dist/temp/src/components/date-picker/RangeDatePickerWithButtons.d.ts +71 -0
- package/dist/temp/src/components/date-picker/RangeDatePickerWithButtons.js +55 -0
- package/dist/temp/src/components/date-picker/index.d.ts +4 -0
- package/dist/temp/src/components/date-picker/index.js +4 -0
- package/dist/temp/src/components/date-picker/utils.d.ts +2 -0
- package/dist/temp/src/components/date-picker/utils.js +8 -0
- package/dist/temp/src/components/divider/Divider.d.ts +15 -0
- package/dist/temp/src/components/divider/Divider.js +23 -0
- package/dist/temp/src/components/divider/index.d.ts +1 -0
- package/dist/temp/src/components/divider/index.js +1 -0
- package/dist/temp/src/components/dot/Dot.d.ts +24 -0
- package/dist/temp/src/components/dot/Dot.js +31 -0
- package/dist/temp/src/components/dot/index.d.ts +1 -0
- package/dist/temp/src/components/dot/index.js +1 -0
- package/dist/temp/src/components/dropdown/Dropdown.d.ts +52 -0
- package/dist/temp/src/components/dropdown/Dropdown.js +90 -0
- package/dist/temp/src/components/dropdown/index.d.ts +1 -0
- package/dist/temp/src/components/dropdown/index.js +1 -0
- package/dist/temp/src/components/empty-state/EmptyState.d.ts +14 -0
- package/dist/temp/src/components/empty-state/EmptyState.js +33 -0
- package/dist/temp/src/components/empty-state/index.d.ts +1 -0
- package/dist/temp/src/components/empty-state/index.js +1 -0
- package/dist/temp/src/components/featured-icon/FeaturedIcon.d.ts +15 -0
- package/dist/temp/src/components/featured-icon/FeaturedIcon.js +36 -0
- package/dist/temp/src/components/featured-icon/index.d.ts +1 -0
- package/dist/temp/src/components/featured-icon/index.js +1 -0
- package/dist/temp/src/components/file-input/FileInput.d.ts +61 -0
- package/dist/temp/src/components/file-input/FileInput.js +123 -0
- package/dist/temp/src/components/file-input/index.d.ts +1 -0
- package/dist/temp/src/components/file-input/index.js +1 -0
- package/dist/temp/src/components/image-file-input/ImageFileInput.d.ts +70 -0
- package/dist/temp/src/components/image-file-input/ImageFileInput.js +124 -0
- package/dist/temp/src/components/image-file-input/components/ImagePreview.d.ts +5 -0
- package/dist/temp/src/components/image-file-input/components/ImagePreview.js +18 -0
- package/dist/temp/src/components/image-file-input/index.d.ts +1 -0
- package/dist/temp/src/components/image-file-input/index.js +1 -0
- package/dist/temp/src/components/index.d.ts +33 -0
- package/dist/temp/src/components/index.js +32 -0
- package/dist/temp/src/components/input/InputBase.d.ts +54 -0
- package/dist/temp/src/components/input/InputBase.js +121 -0
- package/dist/temp/src/components/input/NumberInput.d.ts +9 -0
- package/dist/temp/src/components/input/NumberInput.js +93 -0
- package/dist/temp/src/components/input/PasswordInput.d.ts +2 -0
- package/dist/temp/src/components/input/PasswordInput.js +51 -0
- package/dist/temp/src/components/input/Textarea.d.ts +14 -0
- package/dist/temp/src/components/input/Textarea.js +60 -0
- package/dist/temp/src/components/input/index.d.ts +4 -0
- package/dist/temp/src/components/input/index.js +4 -0
- package/dist/temp/src/components/modal/Modal.d.ts +79 -0
- package/dist/temp/src/components/modal/Modal.js +101 -0
- package/dist/temp/src/components/modal/index.d.ts +1 -0
- package/dist/temp/src/components/modal/index.js +1 -0
- package/dist/temp/src/components/notification/FloatingNotification.d.ts +37 -0
- package/dist/temp/src/components/notification/FloatingNotification.js +79 -0
- package/dist/temp/src/components/notification/FullWidthNotification.d.ts +46 -0
- package/dist/temp/src/components/notification/FullWidthNotification.js +79 -0
- package/dist/temp/src/components/notification/MessageNotification.d.ts +41 -0
- package/dist/temp/src/components/notification/MessageNotification.js +57 -0
- package/dist/temp/src/components/notification/Notification.d.ts +72 -0
- package/dist/temp/src/components/notification/Notification.js +42 -0
- package/dist/temp/src/components/notification/index.d.ts +4 -0
- package/dist/temp/src/components/notification/index.js +4 -0
- package/dist/temp/src/components/pagination/NavButton.d.ts +31 -0
- package/dist/temp/src/components/pagination/NavButton.js +66 -0
- package/dist/temp/src/components/pagination/Pagination.d.ts +11 -0
- package/dist/temp/src/components/pagination/Pagination.js +93 -0
- package/dist/temp/src/components/pagination/index.d.ts +2 -0
- package/dist/temp/src/components/pagination/index.js +2 -0
- package/dist/temp/src/components/progress-bar/ProgressBar.d.ts +2 -0
- package/dist/temp/src/components/progress-bar/ProgressBar.js +31 -0
- package/dist/temp/src/components/progress-bar/components/SegmentBar.d.ts +7 -0
- package/dist/temp/src/components/progress-bar/components/SegmentBar.js +10 -0
- package/dist/temp/src/components/progress-bar/components/SegmentLabels.d.ts +15 -0
- package/dist/temp/src/components/progress-bar/components/SegmentLabels.js +45 -0
- package/dist/temp/src/components/progress-bar/hooks/useProgressBar.d.ts +13 -0
- package/dist/temp/src/components/progress-bar/hooks/useProgressBar.js +96 -0
- package/dist/temp/src/components/progress-bar/index.d.ts +2 -0
- package/dist/temp/src/components/progress-bar/index.js +2 -0
- package/dist/temp/src/components/progress-bar/types.d.ts +15 -0
- package/dist/temp/src/components/progress-bar/types.js +1 -0
- package/dist/temp/src/components/progress-bar/utils.d.ts +13 -0
- package/dist/temp/src/components/progress-bar/utils.js +26 -0
- package/dist/temp/src/components/progress-circle/ProgressCircle.d.ts +7 -0
- package/dist/temp/src/components/progress-circle/ProgressCircle.js +21 -0
- package/dist/temp/src/components/progress-circle/index.d.ts +1 -0
- package/dist/temp/src/components/progress-circle/index.js +1 -0
- package/dist/temp/src/components/radio/Radio.d.ts +7 -0
- package/dist/temp/src/components/radio/Radio.js +30 -0
- package/dist/temp/src/components/radio/RadioInput.d.ts +8 -0
- package/dist/temp/src/components/radio/RadioInput.js +29 -0
- package/dist/temp/src/components/radio/index.d.ts +2 -0
- package/dist/temp/src/components/radio/index.js +2 -0
- package/dist/temp/src/components/select/Select.d.ts +16 -0
- package/dist/temp/src/components/select/Select.js +33 -0
- package/dist/temp/src/components/select/index.d.ts +1 -0
- package/dist/temp/src/components/select/index.js +1 -0
- package/dist/temp/src/components/select-dropdown/SelectDropdown.d.ts +29 -0
- package/dist/temp/src/components/select-dropdown/SelectDropdown.js +49 -0
- package/dist/temp/src/components/select-dropdown/index.d.ts +1 -0
- package/dist/temp/src/components/select-dropdown/index.js +1 -0
- package/dist/temp/src/components/selectbox/SelectBox.d.ts +27 -0
- package/dist/temp/src/components/selectbox/SelectBox.js +163 -0
- package/dist/temp/src/components/selectbox/index.d.ts +1 -0
- package/dist/temp/src/components/selectbox/index.js +1 -0
- package/dist/temp/src/components/shared/hintText/HintText.d.ts +7 -0
- package/dist/temp/src/components/shared/hintText/HintText.js +28 -0
- package/dist/temp/src/components/shared/hintText/index.d.ts +1 -0
- package/dist/temp/src/components/shared/hintText/index.js +1 -0
- package/dist/temp/src/components/shared/index.d.ts +2 -0
- package/dist/temp/src/components/shared/index.js +2 -0
- package/dist/temp/src/components/shared/label/Label.d.ts +7 -0
- package/dist/temp/src/components/shared/label/Label.js +28 -0
- package/dist/temp/src/components/shared/label/index.d.ts +1 -0
- package/dist/temp/src/components/shared/label/index.js +1 -0
- package/dist/temp/src/components/slider/Slider.d.ts +14 -0
- package/dist/temp/src/components/slider/Slider.js +44 -0
- package/dist/temp/src/components/slider/index.d.ts +1 -0
- package/dist/temp/src/components/slider/index.js +1 -0
- package/dist/temp/src/components/spinner/Spinner.d.ts +9 -0
- package/dist/temp/src/components/spinner/Spinner.js +21 -0
- package/dist/temp/src/components/spinner/index.d.ts +1 -0
- package/dist/temp/src/components/spinner/index.js +1 -0
- package/dist/temp/src/components/switch/Switch.d.ts +22 -0
- package/dist/temp/src/components/switch/Switch.js +68 -0
- package/dist/temp/src/components/switch/index.d.ts +2 -0
- package/dist/temp/src/components/switch/index.js +1 -0
- package/dist/temp/src/components/tab/HorizontalTab.d.ts +12 -0
- package/dist/temp/src/components/tab/HorizontalTab.js +37 -0
- package/dist/temp/src/components/tab/TabButton.d.ts +23 -0
- package/dist/temp/src/components/tab/TabButton.js +37 -0
- package/dist/temp/src/components/tab/VerticalTab.d.ts +9 -0
- package/dist/temp/src/components/tab/VerticalTab.js +32 -0
- package/dist/temp/src/components/tab/index.d.ts +3 -0
- package/dist/temp/src/components/tab/index.js +3 -0
- package/dist/temp/src/components/tag/Tag.d.ts +17 -0
- package/dist/temp/src/components/tag/Tag.js +110 -0
- package/dist/temp/src/components/tag/index.d.ts +1 -0
- package/dist/temp/src/components/tag/index.js +1 -0
- package/dist/temp/src/components/toggle/Toggle.d.ts +10 -0
- package/dist/temp/src/components/toggle/Toggle.js +30 -0
- package/dist/temp/src/components/toggle/index.d.ts +1 -0
- package/dist/temp/src/components/toggle/index.js +1 -0
- package/dist/temp/src/components/tooltip/Tooltip.d.ts +15 -0
- package/dist/temp/src/components/tooltip/Tooltip.js +122 -0
- package/dist/temp/src/components/tooltip/index.d.ts +1 -0
- package/dist/temp/src/components/tooltip/index.js +1 -0
- package/dist/temp/src/constant/breakpoint.d.ts +6 -0
- package/dist/temp/src/constant/breakpoint.js +6 -0
- package/dist/temp/src/constant/date-picker.d.ts +63 -0
- package/dist/temp/src/constant/date-picker.js +53 -0
- package/dist/temp/src/constant/index.d.ts +2 -0
- package/dist/temp/src/constant/index.js +2 -0
- package/dist/temp/src/constant/size.d.ts +1 -0
- package/dist/temp/src/constant/size.js +1 -0
- package/dist/temp/src/hooks/dropdown/index.d.ts +6 -0
- package/dist/temp/src/hooks/dropdown/index.js +6 -0
- package/dist/temp/src/hooks/dropdown/useDropdown.d.ts +29 -0
- package/dist/temp/src/hooks/dropdown/useDropdown.js +84 -0
- package/dist/temp/src/hooks/dropdown/useDropdownKeyboard.d.ts +10 -0
- package/dist/temp/src/hooks/dropdown/useDropdownKeyboard.js +108 -0
- package/dist/temp/src/hooks/dropdown/useDropdownPosition.d.ts +9 -0
- package/dist/temp/src/hooks/dropdown/useDropdownPosition.js +18 -0
- package/dist/temp/src/hooks/dropdown/useOutsideClick.d.ts +5 -0
- package/dist/temp/src/hooks/dropdown/useOutsideClick.js +23 -0
- package/dist/temp/src/hooks/dropdown/useScrollLock.d.ts +4 -0
- package/dist/temp/src/hooks/dropdown/useScrollLock.js +72 -0
- package/dist/temp/src/hooks/dropdown/useWindowResize.d.ts +7 -0
- package/dist/temp/src/hooks/dropdown/useWindowResize.js +44 -0
- package/dist/temp/src/hooks/index.d.ts +4 -0
- package/dist/temp/src/hooks/index.js +6 -0
- package/dist/temp/src/hooks/useCallbackRef.d.ts +27 -0
- package/dist/temp/src/hooks/useCallbackRef.js +44 -0
- package/dist/temp/src/hooks/useMediaQuery.d.ts +5 -0
- package/dist/temp/src/hooks/useMediaQuery.js +20 -0
- package/dist/temp/src/hooks/useMergeRefs.d.ts +20 -0
- package/dist/temp/src/hooks/useMergeRefs.js +31 -0
- package/dist/temp/src/types/dropdown/dropdown.d.ts +39 -0
- package/dist/temp/src/types/dropdown/dropdown.js +1 -0
- package/dist/temp/src/types/dropdown/index.d.ts +2 -0
- package/dist/temp/src/types/dropdown/index.js +2 -0
- package/dist/temp/src/types/dropdown/option.d.ts +23 -0
- package/dist/temp/src/types/dropdown/option.js +1 -0
- package/dist/temp/src/types/index.d.ts +2 -0
- package/dist/temp/src/types/index.js +2 -0
- package/dist/temp/src/types/side-slot.d.ts +25 -0
- package/dist/temp/src/types/side-slot.js +1 -0
- package/dist/temp/src/utils/date-picker.d.ts +11 -0
- package/dist/temp/src/utils/date-picker.js +51 -0
- package/dist/temp/src/utils/dropdown/dropdownUtils.d.ts +17 -0
- package/dist/temp/src/utils/dropdown/dropdownUtils.js +79 -0
- package/dist/temp/src/utils/dropdown/index.d.ts +2 -0
- package/dist/temp/src/utils/dropdown/index.js +2 -0
- package/dist/temp/src/utils/dropdown/multiSelect.d.ts +31 -0
- package/dist/temp/src/utils/dropdown/multiSelect.js +68 -0
- package/dist/temp/src/utils/index.d.ts +2 -0
- package/dist/temp/src/utils/index.js +4 -0
- package/dist/types/assets/scripts/baseBox.d.ts +55 -0
- package/dist/types/assets/scripts/comboBox.d.ts +7 -38
- package/dist/types/assets/scripts/datePicker.d.ts +0 -1
- package/dist/types/assets/scripts/featuredIcon.d.ts +0 -1
- package/dist/types/assets/scripts/fileInput/const/classNames.d.ts +0 -2
- package/dist/types/assets/scripts/fileInput/const/index.d.ts +0 -1
- package/dist/types/assets/scripts/fileInput/const/types.d.ts +4 -48
- package/dist/types/assets/scripts/fileInput/fileInput.d.ts +13 -0
- package/dist/types/assets/scripts/fileInput/fileInputModel.d.ts +12 -0
- package/dist/types/assets/scripts/fileInput/fileInputView.d.ts +42 -0
- package/dist/types/assets/scripts/fileInput/index.d.ts +1 -2
- package/dist/types/assets/scripts/imageFileInput/ImageFileInput.d.ts +0 -1
- package/dist/types/assets/scripts/imageFileInput/ImageFileInputModel.d.ts +0 -1
- package/dist/types/assets/scripts/imageFileInput/ImageFileInputView.d.ts +0 -1
- package/dist/types/assets/scripts/imageFileInput/const/classNames.d.ts +0 -1
- package/dist/types/assets/scripts/imageFileInput/const/index.d.ts +0 -1
- package/dist/types/assets/scripts/imageFileInput/const/types.d.ts +0 -1
- package/dist/types/assets/scripts/imageFileInput/index.d.ts +0 -1
- package/dist/types/assets/scripts/index.d.ts +0 -1
- package/dist/types/assets/scripts/modal/Modal.d.ts +0 -1
- package/dist/types/assets/scripts/modal/ModalActions.d.ts +0 -1
- package/dist/types/assets/scripts/modal/ModalContent.d.ts +0 -1
- package/dist/types/assets/scripts/modal/ModalHeader.d.ts +0 -1
- package/dist/types/assets/scripts/modal/const/classNames.d.ts +0 -1
- package/dist/types/assets/scripts/modal/const/index.d.ts +0 -1
- package/dist/types/assets/scripts/modal/const/types.d.ts +0 -1
- package/dist/types/assets/scripts/modal/index.d.ts +0 -1
- package/dist/types/assets/scripts/modal/utils/contentUtils.d.ts +0 -1
- package/dist/types/assets/scripts/notification/FloatingNotification.d.ts +0 -1
- package/dist/types/assets/scripts/notification/FullWidthNotification.d.ts +0 -1
- package/dist/types/assets/scripts/notification/MessageNotification.d.ts +0 -1
- package/dist/types/assets/scripts/notification/Notification.d.ts +0 -1
- package/dist/types/assets/scripts/notification/const/classNames.d.ts +0 -1
- package/dist/types/assets/scripts/notification/const/icons.d.ts +0 -1
- package/dist/types/assets/scripts/notification/const/index.d.ts +0 -1
- package/dist/types/assets/scripts/notification/const/sizes.d.ts +0 -1
- package/dist/types/assets/scripts/notification/const/types.d.ts +0 -1
- package/dist/types/assets/scripts/notification/index.d.ts +0 -1
- package/dist/types/assets/scripts/notification/utils.d.ts +0 -1
- package/dist/types/assets/scripts/progress-bar/ProgressBar.d.ts +0 -1
- package/dist/types/assets/scripts/progress-bar/index.d.ts +0 -1
- package/dist/types/assets/scripts/selectBox.d.ts +6 -33
- package/dist/types/assets/scripts/shared/ButtonCloseX.d.ts +0 -1
- package/dist/types/assets/scripts/slider.d.ts +0 -1
- package/dist/types/assets/scripts/tab.d.ts +0 -1
- package/dist/types/assets/scripts/tag/Tag.d.ts +0 -1
- package/dist/types/assets/scripts/tag/const/classNames.d.ts +0 -1
- package/dist/types/assets/scripts/tag/const/index.d.ts +0 -1
- package/dist/types/assets/scripts/tag/const/sizes.d.ts +0 -1
- package/dist/types/assets/scripts/tag/const/types.d.ts +0 -1
- package/dist/types/assets/scripts/tag/index.d.ts +0 -1
- package/dist/types/assets/scripts/tooltip/Tooltip.d.ts +0 -1
- package/dist/types/assets/scripts/tooltip/TooltipLayerManager.d.ts +0 -1
- package/dist/types/assets/scripts/tooltip/const/classNames.d.ts +0 -1
- package/dist/types/assets/scripts/tooltip/const/constants.d.ts +0 -1
- package/dist/types/assets/scripts/tooltip/const/icons.d.ts +0 -1
- package/dist/types/assets/scripts/tooltip/const/index.d.ts +0 -1
- package/dist/types/assets/scripts/tooltip/const/templates.d.ts +0 -1
- package/dist/types/assets/scripts/tooltip/const/types.d.ts +0 -1
- package/dist/types/assets/scripts/tooltip/index.d.ts +0 -1
- package/dist/types/assets/scripts/tooltip/utils.d.ts +0 -1
- package/dist/types/assets/scripts/utils/debounce.d.ts +8 -0
- package/dist/types/assets/scripts/utils/unifiedBox/domRenderer.d.ts +107 -0
- package/dist/types/assets/scripts/utils/unifiedBox/dropdownModel.d.ts +142 -0
- package/dist/types/assets/scripts/utils/unifiedBox/unifiedBoxController.d.ts +156 -0
- package/dist/types/assets/scripts/utils/unifiedBox/unifiedBoxManager.d.ts +95 -0
- package/dist/types/constant/color.d.ts +0 -1
- package/dist/types/constant/size.d.ts +0 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/src/components/badge/Badge.d.ts +10 -9
- package/dist/types/src/components/badge/BadgeGroup.d.ts +7 -6
- package/dist/types/src/components/badge/index.d.ts +0 -1
- package/dist/types/src/components/badge/utils.d.ts +4 -3
- package/dist/types/src/components/breadcrumb/BreadCrumb.d.ts +5 -4
- package/dist/types/src/components/breadcrumb/index.d.ts +0 -1
- package/dist/types/src/components/button/Button.d.ts +2 -1
- package/dist/types/src/components/button/ButtonCloseX.d.ts +4 -3
- package/dist/types/src/components/button/ButtonGroup.d.ts +7 -9
- package/dist/types/src/components/button/ButtonStepper.d.ts +1 -2
- package/dist/types/src/components/button/index.d.ts +0 -1
- package/dist/types/src/components/carousel/CarouselArrow.d.ts +1 -3
- package/dist/types/src/components/carousel/CarouselNumberGroup.d.ts +1 -3
- package/dist/types/src/components/carousel/index.d.ts +0 -1
- package/dist/types/src/components/checkbox/Checkbox.d.ts +2 -3
- package/dist/types/src/components/checkbox/CheckboxInput.d.ts +2 -3
- package/dist/types/src/components/checkbox/index.d.ts +0 -1
- package/dist/types/src/components/combobox/ComboBox.d.ts +7 -6
- package/dist/types/src/components/combobox/index.d.ts +1 -2
- package/dist/types/src/components/date-picker/CustomInput.d.ts +2 -3
- package/dist/types/src/components/date-picker/DatePicker.d.ts +7 -6
- package/dist/types/src/components/date-picker/RangeDatePicker.d.ts +6 -5
- package/dist/types/src/components/date-picker/RangeDatePickerWithButtons.d.ts +4 -4
- package/dist/types/src/components/date-picker/index.d.ts +0 -1
- package/dist/types/src/components/date-picker/utils.d.ts +0 -1
- package/dist/types/src/components/divider/Divider.d.ts +1 -2
- package/dist/types/src/components/divider/index.d.ts +0 -1
- package/dist/types/src/components/dot/Dot.d.ts +9 -8
- package/dist/types/src/components/dot/index.d.ts +0 -1
- package/dist/types/src/components/dropdown/Dropdown.d.ts +0 -1
- package/dist/types/src/components/dropdown/index.d.ts +0 -1
- package/dist/types/src/components/empty-state/EmptyState.d.ts +5 -5
- package/dist/types/src/components/empty-state/index.d.ts +0 -1
- package/dist/types/src/components/featured-icon/FeaturedIcon.d.ts +8 -7
- package/dist/types/src/components/featured-icon/index.d.ts +0 -1
- package/dist/types/src/components/file-input/FileInput.d.ts +0 -1
- package/dist/types/src/components/file-input/index.d.ts +0 -1
- package/dist/types/src/components/image-file-input/ImageFileInput.d.ts +0 -1
- package/dist/types/src/components/image-file-input/components/ImagePreview.d.ts +0 -1
- package/dist/types/src/components/image-file-input/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts +1 -2
- package/dist/types/src/components/input/InputBase.d.ts +4 -4
- package/dist/types/src/components/input/NumberInput.d.ts +1 -2
- package/dist/types/src/components/input/PasswordInput.d.ts +1 -2
- package/dist/types/src/components/input/Textarea.d.ts +2 -3
- package/dist/types/src/components/input/index.d.ts +0 -1
- package/dist/types/src/components/modal/Modal.d.ts +13 -12
- package/dist/types/src/components/modal/index.d.ts +0 -1
- package/dist/types/src/components/notification/FloatingNotification.d.ts +6 -5
- package/dist/types/src/components/notification/FullWidthNotification.d.ts +6 -5
- package/dist/types/src/components/notification/MessageNotification.d.ts +6 -5
- package/dist/types/src/components/notification/Notification.d.ts +11 -10
- package/dist/types/src/components/notification/index.d.ts +1 -2
- package/dist/types/src/components/pagination/NavButton.d.ts +0 -1
- package/dist/types/src/components/pagination/Pagination.d.ts +0 -1
- package/dist/types/src/components/pagination/index.d.ts +0 -1
- package/dist/types/src/components/progress-bar/ProgressBar.d.ts +0 -1
- package/dist/types/src/components/progress-bar/components/SegmentBar.d.ts +0 -1
- package/dist/types/src/components/progress-bar/components/SegmentLabels.d.ts +3 -4
- package/dist/types/src/components/progress-bar/hooks/useProgressBar.d.ts +1 -2
- package/dist/types/src/components/progress-bar/index.d.ts +0 -1
- package/dist/types/src/components/progress-bar/types.d.ts +0 -1
- package/dist/types/src/components/progress-bar/utils.d.ts +4 -4
- package/dist/types/src/components/progress-circle/ProgressCircle.d.ts +0 -1
- package/dist/types/src/components/progress-circle/index.d.ts +0 -1
- package/dist/types/src/components/radio/Radio.d.ts +2 -3
- package/dist/types/src/components/radio/RadioInput.d.ts +2 -3
- package/dist/types/src/components/radio/index.d.ts +0 -1
- package/dist/types/src/components/select/Select.d.ts +4 -5
- package/dist/types/src/components/select/index.d.ts +0 -1
- package/dist/types/src/components/select-dropdown/SelectDropdown.d.ts +6 -6
- package/dist/types/src/components/select-dropdown/index.d.ts +1 -2
- package/dist/types/src/components/selectbox/SelectBox.d.ts +5 -4
- package/dist/types/src/components/selectbox/index.d.ts +0 -1
- package/dist/types/src/components/shared/hintText/HintText.d.ts +0 -1
- package/dist/types/src/components/shared/hintText/index.d.ts +0 -1
- package/dist/types/src/components/shared/index.d.ts +0 -1
- package/dist/types/src/components/shared/label/Label.d.ts +0 -1
- package/dist/types/src/components/shared/label/index.d.ts +0 -1
- package/dist/types/src/components/slider/Slider.d.ts +1 -2
- package/dist/types/src/components/slider/index.d.ts +0 -1
- package/dist/types/src/components/spinner/Spinner.d.ts +1 -2
- package/dist/types/src/components/spinner/index.d.ts +0 -2
- package/dist/types/src/components/switch/Switch.d.ts +7 -7
- package/dist/types/src/components/switch/index.d.ts +1 -2
- package/dist/types/src/components/tab/HorizontalTab.d.ts +5 -4
- package/dist/types/src/components/tab/TabButton.d.ts +8 -8
- package/dist/types/src/components/tab/VerticalTab.d.ts +2 -3
- package/dist/types/src/components/tab/index.d.ts +0 -1
- package/dist/types/src/components/tag/Tag.d.ts +4 -4
- package/dist/types/src/components/tag/index.d.ts +0 -1
- package/dist/types/src/components/toggle/Toggle.d.ts +1 -2
- package/dist/types/src/components/toggle/index.d.ts +0 -1
- package/dist/types/src/components/tooltip/Tooltip.d.ts +0 -1
- package/dist/types/src/components/tooltip/index.d.ts +0 -1
- package/dist/types/src/constant/breakpoint.d.ts +0 -1
- package/dist/types/src/constant/date-picker.d.ts +0 -1
- package/dist/types/src/constant/index.d.ts +1 -2
- package/dist/types/src/constant/size.d.ts +0 -1
- package/dist/types/src/hooks/dropdown/index.d.ts +0 -1
- package/dist/types/src/hooks/dropdown/useDropdown.d.ts +1 -2
- package/dist/types/src/hooks/dropdown/useDropdownKeyboard.d.ts +2 -3
- package/dist/types/src/hooks/dropdown/useDropdownPosition.d.ts +1 -2
- package/dist/types/src/hooks/dropdown/useOutsideClick.d.ts +1 -2
- package/dist/types/src/hooks/dropdown/useScrollLock.d.ts +0 -1
- package/dist/types/src/hooks/dropdown/useWindowResize.d.ts +0 -1
- package/dist/types/src/hooks/index.d.ts +1 -2
- package/dist/types/src/hooks/useCallbackRef.d.ts +0 -1
- package/dist/types/src/hooks/useMediaQuery.d.ts +0 -1
- package/dist/types/src/hooks/useMergeRefs.d.ts +1 -2
- package/dist/types/src/types/dropdown/dropdown.d.ts +1 -2
- package/dist/types/src/types/dropdown/index.d.ts +0 -1
- package/dist/types/src/types/dropdown/option.d.ts +0 -1
- package/dist/types/src/types/index.d.ts +0 -1
- package/dist/types/src/types/side-slot.d.ts +0 -1
- package/dist/types/src/utils/date-picker.d.ts +1 -2
- package/dist/types/src/utils/dropdown/dropdownUtils.d.ts +2 -3
- package/dist/types/src/utils/dropdown/index.d.ts +0 -1
- package/dist/types/src/utils/dropdown/multiSelect.d.ts +1 -2
- package/dist/types/src/utils/index.d.ts +0 -1
- package/dist/ui-admin/assets/styles/style.css +112 -24
- package/package.json +49 -53
- package/dist/cjs/assets/scripts/fileInput/FileInput.js +0 -183
- package/dist/cjs/assets/scripts/fileInput/FileInputModel.js +0 -246
- package/dist/cjs/assets/scripts/fileInput/FileInputView.js +0 -455
- package/dist/esm/assets/scripts/fileInput/FileInput.js +0 -178
- package/dist/esm/assets/scripts/fileInput/FileInputModel.js +0 -241
- package/dist/esm/assets/scripts/fileInput/FileInputView.js +0 -450
- /package/dist/cjs/assets/scripts/utils/unifiedBox/{DOMRenderer.js → domRenderer.js} +0 -0
- /package/dist/esm/assets/scripts/utils/unifiedBox/{DOMRenderer.js → domRenderer.js} +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { useCallback, useRef } from 'react';
|
|
2
|
+
import { calculateNextFocusIndex } from '../../utils/dropdown';
|
|
3
|
+
var SCROLL_DELAY_MS = 100;
|
|
4
|
+
/**
|
|
5
|
+
* 드롭다운 키보드 네비게이션을 위한 커스텀 훅
|
|
6
|
+
*/
|
|
7
|
+
export var useDropdownKeyboard = function (config) {
|
|
8
|
+
var isOpen = config.isOpen, disabled = config.disabled, focusedIndex = config.focusedIndex, optionItems = config.optionItems, onToggle = config.onToggle, onSelect = config.onSelect, onClose = config.onClose, onFocusChange = config.onFocusChange, triggerRef = config.triggerRef, dropdownRef = config.dropdownRef;
|
|
9
|
+
// 키보드 네비게이션 플래그
|
|
10
|
+
var isKeyboardNavigationRef = useRef(false);
|
|
11
|
+
// 포커스된 옵션이 보이도록 스크롤 조정
|
|
12
|
+
var scrollToFocusedOption = useCallback(function (index) {
|
|
13
|
+
if (!(dropdownRef === null || dropdownRef === void 0 ? void 0 : dropdownRef.current) || index < 0)
|
|
14
|
+
return;
|
|
15
|
+
var optionsList = dropdownRef.current.querySelector('.ncua-select-dropdown__options');
|
|
16
|
+
if (!optionsList)
|
|
17
|
+
return;
|
|
18
|
+
var options = optionsList.querySelectorAll('.ncua-select-dropdown__option');
|
|
19
|
+
var focusedOption = options[index];
|
|
20
|
+
if (!focusedOption)
|
|
21
|
+
return;
|
|
22
|
+
var optionsListRect = optionsList.getBoundingClientRect();
|
|
23
|
+
var focusedOptionRect = focusedOption.getBoundingClientRect();
|
|
24
|
+
// 옵션이 위쪽으로 벗어났을 때
|
|
25
|
+
if (focusedOptionRect.top < optionsListRect.top) {
|
|
26
|
+
optionsList.scrollTop = focusedOption.offsetTop;
|
|
27
|
+
}
|
|
28
|
+
// 옵션이 아래쪽으로 벗어났을 때
|
|
29
|
+
else if (focusedOptionRect.bottom > optionsListRect.bottom) {
|
|
30
|
+
optionsList.scrollTop = focusedOption.offsetTop + focusedOption.offsetHeight - optionsList.clientHeight;
|
|
31
|
+
}
|
|
32
|
+
}, [dropdownRef]);
|
|
33
|
+
var handleEnterOrSpace = useCallback(function (e) {
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
if (!isOpen) {
|
|
36
|
+
onToggle();
|
|
37
|
+
}
|
|
38
|
+
else if (focusedIndex >= 0 && optionItems[focusedIndex]) {
|
|
39
|
+
onSelect(optionItems[focusedIndex]);
|
|
40
|
+
}
|
|
41
|
+
}, [isOpen, focusedIndex, optionItems, onToggle, onSelect]);
|
|
42
|
+
var handleEscape = useCallback(function (e) {
|
|
43
|
+
var _a;
|
|
44
|
+
if (isOpen) {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
onClose();
|
|
47
|
+
(_a = triggerRef === null || triggerRef === void 0 ? void 0 : triggerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
48
|
+
}
|
|
49
|
+
}, [isOpen, onClose, triggerRef]);
|
|
50
|
+
var handleArrowNavigation = useCallback(function (e, direction) {
|
|
51
|
+
e.preventDefault();
|
|
52
|
+
isKeyboardNavigationRef.current = true;
|
|
53
|
+
if (isOpen) {
|
|
54
|
+
var nextIndex_1 = calculateNextFocusIndex(focusedIndex, direction, optionItems.length);
|
|
55
|
+
onFocusChange(nextIndex_1);
|
|
56
|
+
setTimeout(function () { return scrollToFocusedOption(nextIndex_1); }, SCROLL_DELAY_MS);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
onToggle();
|
|
60
|
+
}
|
|
61
|
+
}, [isOpen, focusedIndex, optionItems.length, onFocusChange, onToggle, scrollToFocusedOption]);
|
|
62
|
+
var handleHomeEnd = useCallback(function (e, targetIndex) {
|
|
63
|
+
if (isOpen) {
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
isKeyboardNavigationRef.current = true;
|
|
66
|
+
onFocusChange(targetIndex);
|
|
67
|
+
setTimeout(function () { return scrollToFocusedOption(targetIndex); }, 0);
|
|
68
|
+
}
|
|
69
|
+
}, [isOpen, onFocusChange, scrollToFocusedOption]);
|
|
70
|
+
var handleKeyDown = useCallback(function (e) {
|
|
71
|
+
if (disabled)
|
|
72
|
+
return;
|
|
73
|
+
switch (e.key) {
|
|
74
|
+
case 'Enter':
|
|
75
|
+
case ' ':
|
|
76
|
+
handleEnterOrSpace(e);
|
|
77
|
+
break;
|
|
78
|
+
case 'Escape':
|
|
79
|
+
handleEscape(e);
|
|
80
|
+
break;
|
|
81
|
+
case 'ArrowDown':
|
|
82
|
+
handleArrowNavigation(e, 'down');
|
|
83
|
+
break;
|
|
84
|
+
case 'ArrowUp':
|
|
85
|
+
handleArrowNavigation(e, 'up');
|
|
86
|
+
break;
|
|
87
|
+
case 'Home':
|
|
88
|
+
handleHomeEnd(e, 0);
|
|
89
|
+
break;
|
|
90
|
+
case 'End':
|
|
91
|
+
handleHomeEnd(e, optionItems.length - 1);
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
}, [disabled, optionItems.length, handleEnterOrSpace, handleEscape, handleArrowNavigation, handleHomeEnd]);
|
|
95
|
+
// 마우스 움직임 감지 함수
|
|
96
|
+
var handleMouseMove = useCallback(function () {
|
|
97
|
+
isKeyboardNavigationRef.current = false;
|
|
98
|
+
}, []);
|
|
99
|
+
// 키보드 네비게이션 상태 확인 함수
|
|
100
|
+
var isKeyboardNavigation = useCallback(function () {
|
|
101
|
+
return isKeyboardNavigationRef.current;
|
|
102
|
+
}, []);
|
|
103
|
+
return {
|
|
104
|
+
handleKeyDown: handleKeyDown,
|
|
105
|
+
handleMouseMove: handleMouseMove,
|
|
106
|
+
isKeyboardNavigation: isKeyboardNavigation,
|
|
107
|
+
};
|
|
108
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DropdownDirection, DropdownPositionConfig } from '../../types/dropdown';
|
|
2
|
+
/**
|
|
3
|
+
* 드롭다운 위치 계산을 위한 커스텀 훅
|
|
4
|
+
*/
|
|
5
|
+
export declare const useDropdownPosition: (config: DropdownPositionConfig) => {
|
|
6
|
+
direction: DropdownDirection;
|
|
7
|
+
updatePosition: () => import("../../types/dropdown").DropdownPositionResult;
|
|
8
|
+
setDirection: import("react").Dispatch<import("react").SetStateAction<DropdownDirection>>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useCallback, useState } from 'react';
|
|
2
|
+
import { calculateDropdownPosition } from '../../utils/dropdown';
|
|
3
|
+
/**
|
|
4
|
+
* 드롭다운 위치 계산을 위한 커스텀 훅
|
|
5
|
+
*/
|
|
6
|
+
export var useDropdownPosition = function (config) {
|
|
7
|
+
var _a = useState('down'), direction = _a[0], setDirection = _a[1];
|
|
8
|
+
var updatePosition = useCallback(function () {
|
|
9
|
+
var result = calculateDropdownPosition(config);
|
|
10
|
+
setDirection(result.direction);
|
|
11
|
+
return result;
|
|
12
|
+
}, [config]);
|
|
13
|
+
return {
|
|
14
|
+
direction: direction,
|
|
15
|
+
updatePosition: updatePosition,
|
|
16
|
+
setDirection: setDirection,
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 외부 클릭 감지를 위한 커스텀 훅
|
|
4
|
+
*/
|
|
5
|
+
export var useOutsideClick = function (config) {
|
|
6
|
+
var isOpen = config.isOpen, refs = config.refs, onClose = config.onClose;
|
|
7
|
+
useEffect(function () {
|
|
8
|
+
if (!isOpen)
|
|
9
|
+
return;
|
|
10
|
+
var handleClickOutside = function (event) {
|
|
11
|
+
var target = event.target;
|
|
12
|
+
// 모든 ref들에 대해 클릭이 외부에서 발생했는지 확인
|
|
13
|
+
var isOutside = refs.every(function (ref) { return !ref.current || !ref.current.contains(target); });
|
|
14
|
+
if (isOutside) {
|
|
15
|
+
onClose();
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
19
|
+
return function () {
|
|
20
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
21
|
+
};
|
|
22
|
+
}, [isOpen, refs, onClose]);
|
|
23
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
import { findScrollableParent } from '../../utils';
|
|
3
|
+
var SCROLL_KEYS = ['PageUp', 'PageDown', 'Home', 'End', ' '];
|
|
4
|
+
/** 이벤트 대상이 드롭다운 내부에 있는지 확인 */
|
|
5
|
+
function isInsideDropdown(target, dropdownRef) {
|
|
6
|
+
return !!(dropdownRef === null || dropdownRef === void 0 ? void 0 : dropdownRef.current) && dropdownRef.current.contains(target);
|
|
7
|
+
}
|
|
8
|
+
/** 스크롤 가능한 요소의 경계에 도달했는지 확인하고, 도달했으면 이벤트 차단 */
|
|
9
|
+
function preventScrollBeyondBounds(e, scrollableElement) {
|
|
10
|
+
var deltaY = e.deltaY;
|
|
11
|
+
var scrollTop = scrollableElement.scrollTop, scrollHeight = scrollableElement.scrollHeight, clientHeight = scrollableElement.clientHeight;
|
|
12
|
+
// 스크롤이 위쪽 끝에 도달했고 위로 스크롤하려는 경우
|
|
13
|
+
if (scrollTop === 0 && deltaY < 0) {
|
|
14
|
+
e.preventDefault();
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
// 스크롤이 아래쪽 끝에 도달했고 아래로 스크롤하려는 경우
|
|
18
|
+
if (scrollTop + clientHeight >= scrollHeight && deltaY > 0) {
|
|
19
|
+
e.preventDefault();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 페이지 스크롤을 잠그는 커스텀 훅 (드롭다운 내부 스크롤은 허용)
|
|
24
|
+
*/
|
|
25
|
+
export var useScrollLock = function (isLocked, dropdownRef) {
|
|
26
|
+
var scrollPosition = useRef(0);
|
|
27
|
+
useEffect(function () {
|
|
28
|
+
if (isLocked) {
|
|
29
|
+
// 현재 스크롤 위치 저장
|
|
30
|
+
scrollPosition.current = window.pageYOffset;
|
|
31
|
+
// 스크롤 방지 함수 (드롭다운 내부는 스크롤 체이닝 방지)
|
|
32
|
+
var preventScroll_1 = function (e) {
|
|
33
|
+
// 드롭다운 내부에서 발생하지 않은 이벤트는 차단
|
|
34
|
+
if (!isInsideDropdown(e.target, dropdownRef)) {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
// 드롭다운 내부의 스크롤 가능한 요소 찾기
|
|
39
|
+
var scrollableElement = findScrollableParent(e.target, dropdownRef.current);
|
|
40
|
+
if (scrollableElement && e instanceof WheelEvent) {
|
|
41
|
+
preventScrollBeyondBounds(e, scrollableElement);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
// 드롭다운 내부에 스크롤 가능한 요소가 없으면 차단
|
|
45
|
+
if (!scrollableElement) {
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
// 키보드 스크롤 방지 함수 (드롭다운 내부는 제외)
|
|
50
|
+
var preventKeyboardScroll_1 = function (e) {
|
|
51
|
+
if (isInsideDropdown(e.target, dropdownRef)) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (SCROLL_KEYS.includes(e.key)) {
|
|
55
|
+
e.preventDefault();
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
// 이벤트 리스너 추가
|
|
59
|
+
document.addEventListener('wheel', preventScroll_1, { passive: false });
|
|
60
|
+
document.addEventListener('touchmove', preventScroll_1, { passive: false });
|
|
61
|
+
document.addEventListener('keydown', preventKeyboardScroll_1);
|
|
62
|
+
return function () {
|
|
63
|
+
// 이벤트 리스너 제거
|
|
64
|
+
document.removeEventListener('wheel', preventScroll_1);
|
|
65
|
+
document.removeEventListener('touchmove', preventScroll_1);
|
|
66
|
+
document.removeEventListener('keydown', preventKeyboardScroll_1);
|
|
67
|
+
// 스크롤 위치 복원
|
|
68
|
+
window.scrollTo(0, scrollPosition.current);
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
}, [isLocked, dropdownRef]);
|
|
72
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resize Observer를 사용하여 요소의 크기 변화를 감지하는 커스텀 훅
|
|
3
|
+
* @param callback 크기 변화 시 실행될 콜백 함수
|
|
4
|
+
* @param isActive 옵저버 활성화 여부
|
|
5
|
+
* @param target 관찰할 대상 요소 (기본값: document.body)
|
|
6
|
+
*/
|
|
7
|
+
export declare const useWindowResize: (callback: () => void, isActive?: boolean, target?: HTMLElement | null) => void;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Resize Observer를 사용하여 요소의 크기 변화를 감지하는 커스텀 훅
|
|
4
|
+
* @param callback 크기 변화 시 실행될 콜백 함수
|
|
5
|
+
* @param isActive 옵저버 활성화 여부
|
|
6
|
+
* @param target 관찰할 대상 요소 (기본값: document.body)
|
|
7
|
+
*/
|
|
8
|
+
export var useWindowResize = function (callback, isActive, target) {
|
|
9
|
+
if (isActive === void 0) { isActive = true; }
|
|
10
|
+
var resizeObserverRef = useRef(null);
|
|
11
|
+
useEffect(function () {
|
|
12
|
+
if (!isActive)
|
|
13
|
+
return;
|
|
14
|
+
// Resize Observer 지원 여부 확인
|
|
15
|
+
if (!window.ResizeObserver) {
|
|
16
|
+
// Resize Observer를 지원하지 않는 브라우저의 경우 기존 방식 사용
|
|
17
|
+
var handleResize_1 = function () {
|
|
18
|
+
callback();
|
|
19
|
+
};
|
|
20
|
+
window.addEventListener('resize', handleResize_1);
|
|
21
|
+
return function () {
|
|
22
|
+
window.removeEventListener('resize', handleResize_1);
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
// Resize Observer 생성
|
|
26
|
+
resizeObserverRef.current = new ResizeObserver(function (entries) {
|
|
27
|
+
// entries가 비어있지 않을 때만 콜백 실행
|
|
28
|
+
if (entries.length > 0) {
|
|
29
|
+
callback();
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
// 관찰할 대상 요소 결정
|
|
33
|
+
var targetElement = target || document.body;
|
|
34
|
+
if (targetElement) {
|
|
35
|
+
resizeObserverRef.current.observe(targetElement);
|
|
36
|
+
}
|
|
37
|
+
return function () {
|
|
38
|
+
if (resizeObserverRef.current) {
|
|
39
|
+
resizeObserverRef.current.disconnect();
|
|
40
|
+
resizeObserverRef.current = null;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}, [callback, isActive, target]);
|
|
44
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A callback ref hook that supports cleanup functions.
|
|
3
|
+
* This is useful when you need to perform setup/cleanup operations when the ref changes.
|
|
4
|
+
*
|
|
5
|
+
* @param callback - Function that receives the node and optionally returns a cleanup function
|
|
6
|
+
* @returns A callback ref
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* const MyComponent = () => {
|
|
11
|
+
* const ref = useCallbackRef<HTMLInputElement>((node) => {
|
|
12
|
+
* if (node) {
|
|
13
|
+
* const handleInput = () => console.log('input changed');
|
|
14
|
+
* node.addEventListener('input', handleInput);
|
|
15
|
+
*
|
|
16
|
+
* // Return cleanup function
|
|
17
|
+
* return () => {
|
|
18
|
+
* node.removeEventListener('input', handleInput);
|
|
19
|
+
* };
|
|
20
|
+
* }
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* return <input ref={ref} />;
|
|
24
|
+
* };
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function useCallbackRef<T>(callback: (node: T | null) => (() => void) | void): React.RefCallback<T>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { useCallback, useRef } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A callback ref hook that supports cleanup functions.
|
|
4
|
+
* This is useful when you need to perform setup/cleanup operations when the ref changes.
|
|
5
|
+
*
|
|
6
|
+
* @param callback - Function that receives the node and optionally returns a cleanup function
|
|
7
|
+
* @returns A callback ref
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const MyComponent = () => {
|
|
12
|
+
* const ref = useCallbackRef<HTMLInputElement>((node) => {
|
|
13
|
+
* if (node) {
|
|
14
|
+
* const handleInput = () => console.log('input changed');
|
|
15
|
+
* node.addEventListener('input', handleInput);
|
|
16
|
+
*
|
|
17
|
+
* // Return cleanup function
|
|
18
|
+
* return () => {
|
|
19
|
+
* node.removeEventListener('input', handleInput);
|
|
20
|
+
* };
|
|
21
|
+
* }
|
|
22
|
+
* });
|
|
23
|
+
*
|
|
24
|
+
* return <input ref={ref} />;
|
|
25
|
+
* };
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export function useCallbackRef(callback) {
|
|
29
|
+
var cleanupRef = useRef();
|
|
30
|
+
return useCallback(function (node) {
|
|
31
|
+
// Cleanup previous ref
|
|
32
|
+
if (cleanupRef.current) {
|
|
33
|
+
cleanupRef.current();
|
|
34
|
+
cleanupRef.current = undefined;
|
|
35
|
+
}
|
|
36
|
+
// Set up new ref
|
|
37
|
+
if (node) {
|
|
38
|
+
cleanupRef.current = callback(node);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
callback(null);
|
|
42
|
+
}
|
|
43
|
+
}, [callback]);
|
|
44
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
export var useMediaQuery = function (query, options) {
|
|
3
|
+
var _a = useState(false), matches = _a[0], setMatches = _a[1];
|
|
4
|
+
useEffect(function () {
|
|
5
|
+
var mediaQuery = window.matchMedia(query);
|
|
6
|
+
setMatches(mediaQuery.matches);
|
|
7
|
+
var handleChange = function (e) {
|
|
8
|
+
var _a;
|
|
9
|
+
setMatches(e.matches);
|
|
10
|
+
if (e.matches) {
|
|
11
|
+
(_a = options === null || options === void 0 ? void 0 : options.onMatched) === null || _a === void 0 ? void 0 : _a.call(options);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
mediaQuery.addEventListener('change', handleChange);
|
|
15
|
+
return function () {
|
|
16
|
+
mediaQuery.removeEventListener('change', handleChange);
|
|
17
|
+
};
|
|
18
|
+
}, [query, options === null || options === void 0 ? void 0 : options.onMatched]);
|
|
19
|
+
return matches;
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type Ref<T> = React.RefCallback<T> | React.MutableRefObject<T | null> | null | undefined;
|
|
2
|
+
/**
|
|
3
|
+
* Merges multiple refs into a single callback ref.
|
|
4
|
+
* This is useful when you need to forward a ref while also keeping an internal ref.
|
|
5
|
+
*
|
|
6
|
+
* @param refs - Array of refs to merge
|
|
7
|
+
* @returns A callback ref that will update all provided refs
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const MyComponent = forwardRef<HTMLInputElement, Props>((props, ref) => {
|
|
12
|
+
* const internalRef = useRef<HTMLInputElement>(null);
|
|
13
|
+
* const mergedRef = useMergeRefs([ref, internalRef]);
|
|
14
|
+
*
|
|
15
|
+
* return <input ref={mergedRef} />;
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function useMergeRefs<T>(refs: Ref<T>[]): React.RefCallback<T>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Merges multiple refs into a single callback ref.
|
|
3
|
+
* This is useful when you need to forward a ref while also keeping an internal ref.
|
|
4
|
+
*
|
|
5
|
+
* @param refs - Array of refs to merge
|
|
6
|
+
* @returns A callback ref that will update all provided refs
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* const MyComponent = forwardRef<HTMLInputElement, Props>((props, ref) => {
|
|
11
|
+
* const internalRef = useRef<HTMLInputElement>(null);
|
|
12
|
+
* const mergedRef = useMergeRefs([ref, internalRef]);
|
|
13
|
+
*
|
|
14
|
+
* return <input ref={mergedRef} />;
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export function useMergeRefs(refs) {
|
|
19
|
+
return function (node) {
|
|
20
|
+
refs.forEach(function (ref) {
|
|
21
|
+
if (ref) {
|
|
22
|
+
if (typeof ref === 'function') {
|
|
23
|
+
ref(node);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
ref.current = node;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
export type DropdownDirection = 'up' | 'down';
|
|
3
|
+
export type DropdownPositionConfig = {
|
|
4
|
+
triggerRef: RefObject<HTMLElement>;
|
|
5
|
+
maxHeight: number;
|
|
6
|
+
itemCount: number;
|
|
7
|
+
itemHeight?: number;
|
|
8
|
+
offset?: number;
|
|
9
|
+
};
|
|
10
|
+
export type DropdownPositionResult = {
|
|
11
|
+
direction: DropdownDirection;
|
|
12
|
+
maxHeight: number;
|
|
13
|
+
};
|
|
14
|
+
export type DropdownKeyboardConfig<T> = {
|
|
15
|
+
isOpen: boolean;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
focusedIndex: number;
|
|
18
|
+
optionItems: T[];
|
|
19
|
+
onToggle: () => void;
|
|
20
|
+
onSelect: (option: T) => void;
|
|
21
|
+
onClose: () => void;
|
|
22
|
+
onFocusChange: (index: number) => void;
|
|
23
|
+
triggerRef?: RefObject<HTMLElement>;
|
|
24
|
+
dropdownRef?: RefObject<HTMLElement>;
|
|
25
|
+
};
|
|
26
|
+
export type DropdownOutsideClickConfig = {
|
|
27
|
+
isOpen: boolean;
|
|
28
|
+
refs: RefObject<HTMLElement>[];
|
|
29
|
+
onClose: () => void;
|
|
30
|
+
};
|
|
31
|
+
export type MultiSelectOption = {
|
|
32
|
+
id: string | number;
|
|
33
|
+
label?: string;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
};
|
|
36
|
+
export type SelectedTag = {
|
|
37
|
+
id: string | number;
|
|
38
|
+
label: string;
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 기본 옵션 타입
|
|
3
|
+
*/
|
|
4
|
+
export type OptionType = {
|
|
5
|
+
id: string | number;
|
|
6
|
+
label: string;
|
|
7
|
+
icon?: React.ComponentType<{
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 옵션 값 타입 (단일 또는 다중 선택)
|
|
14
|
+
*/
|
|
15
|
+
export type OptionValue = string | number | (string | number)[];
|
|
16
|
+
/**
|
|
17
|
+
* 옵션 변경 핸들러 타입
|
|
18
|
+
*/
|
|
19
|
+
export type OptionChangeHandler = (value: OptionValue) => void;
|
|
20
|
+
/**
|
|
21
|
+
* 옵션 선택 핸들러 타입
|
|
22
|
+
*/
|
|
23
|
+
export type OptionSelectHandler<T extends OptionType = OptionType> = (option: T) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import type { COLOR } from '../../constant/color';
|
|
3
|
+
import type { DotProps } from '../components';
|
|
4
|
+
export type SlotIconComponent = ComponentType<{
|
|
5
|
+
height?: number;
|
|
6
|
+
width?: number;
|
|
7
|
+
color?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
10
|
+
export type IconSlotType = {
|
|
11
|
+
type: 'icon';
|
|
12
|
+
icon: SlotIconComponent;
|
|
13
|
+
color?: keyof typeof COLOR;
|
|
14
|
+
size?: number;
|
|
15
|
+
};
|
|
16
|
+
export type DotSlotType = {
|
|
17
|
+
type: 'dot';
|
|
18
|
+
color: DotProps['color'];
|
|
19
|
+
size: DotProps['size'];
|
|
20
|
+
};
|
|
21
|
+
export type CustomSlotType = {
|
|
22
|
+
type: 'custom';
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
};
|
|
25
|
+
export type SideSlotType = IconSlotType | DotSlotType | CustomSlotType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type DurationInputArg1, type DurationInputArg2 } from 'moment';
|
|
2
|
+
export declare function getDateFormat(date?: Date | string): string;
|
|
3
|
+
export declare function getToday(): Date;
|
|
4
|
+
export declare function getSubtractDate({ date, period, unit, }: {
|
|
5
|
+
date?: string | Date;
|
|
6
|
+
period: DurationInputArg1;
|
|
7
|
+
unit: DurationInputArg2;
|
|
8
|
+
}): Date;
|
|
9
|
+
export declare const formatDateInput: (input: string) => string;
|
|
10
|
+
export declare const formatHourInput: (input: string) => string;
|
|
11
|
+
export declare const formatMinuteInput: (input: string) => string;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import moment from 'moment';
|
|
2
|
+
var YEAR_LENGTH = 4;
|
|
3
|
+
var MONTH_START = 4;
|
|
4
|
+
var MONTH_END = 6;
|
|
5
|
+
var DAY_START = 6;
|
|
6
|
+
var DAY_END = 8;
|
|
7
|
+
var MAX_HOUR = 23;
|
|
8
|
+
var MAX_MINUTE = 59;
|
|
9
|
+
export function getDateFormat(date) {
|
|
10
|
+
if (date === void 0) { date = getToday(); }
|
|
11
|
+
return moment(date).format('YYYY-MM-DD');
|
|
12
|
+
}
|
|
13
|
+
export function getToday() {
|
|
14
|
+
return moment().toDate();
|
|
15
|
+
}
|
|
16
|
+
export function getSubtractDate(_a) {
|
|
17
|
+
var _b = _a.date, date = _b === void 0 ? getToday() : _b, period = _a.period, unit = _a.unit;
|
|
18
|
+
return moment(date).subtract(period, unit).toDate();
|
|
19
|
+
}
|
|
20
|
+
export var formatDateInput = function (input) {
|
|
21
|
+
var dateRegex = /^(19|20)\d{2}(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[0-1])$/;
|
|
22
|
+
if (dateRegex.test(input)) {
|
|
23
|
+
// 20231112 -> 2023-11-12 형식으로 변환
|
|
24
|
+
var year = input.substring(0, YEAR_LENGTH);
|
|
25
|
+
var month = input.substring(MONTH_START, MONTH_END);
|
|
26
|
+
var day = input.substring(DAY_START, DAY_END);
|
|
27
|
+
return "".concat(year, "-").concat(month, "-").concat(day);
|
|
28
|
+
}
|
|
29
|
+
return input;
|
|
30
|
+
};
|
|
31
|
+
export var formatHourInput = function (input) {
|
|
32
|
+
var numbers = input.replace(/\D/g, '');
|
|
33
|
+
var hourStr = numbers.substring(0, 2);
|
|
34
|
+
var hourNum = Number.parseInt(hourStr, 10);
|
|
35
|
+
if (hourNum >= 0 && hourNum <= MAX_HOUR) {
|
|
36
|
+
return hourStr;
|
|
37
|
+
}
|
|
38
|
+
return input;
|
|
39
|
+
};
|
|
40
|
+
export var formatMinuteInput = function (input) {
|
|
41
|
+
// 숫자만 추출
|
|
42
|
+
var numbers = input.replace(/\D/g, '');
|
|
43
|
+
// 2자리 숫자로 제한
|
|
44
|
+
var minuteStr = numbers.substring(0, 2);
|
|
45
|
+
var minuteNum = Number.parseInt(minuteStr, 10);
|
|
46
|
+
// 00-59 범위 체크
|
|
47
|
+
if (minuteNum >= 0 && minuteNum <= MAX_MINUTE) {
|
|
48
|
+
return minuteStr; // 2자리로 패딩
|
|
49
|
+
}
|
|
50
|
+
return input;
|
|
51
|
+
};
|