@ncds/ui-admin 1.6.4-alpha.1 → 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 +188 -0
- package/dist/cjs/assets/scripts/datePicker.js +706 -0
- package/dist/cjs/assets/scripts/featuredIcon.js +95 -0
- package/dist/cjs/assets/scripts/fileInput/const/classNames.js +31 -0
- package/dist/cjs/assets/scripts/fileInput/const/index.js +27 -0
- package/dist/cjs/assets/scripts/fileInput/const/types.js +13 -0
- 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 +44 -0
- package/dist/cjs/assets/scripts/imageFileInput/ImageFileInput.js +187 -0
- package/dist/cjs/assets/scripts/imageFileInput/ImageFileInputModel.js +255 -0
- package/dist/cjs/assets/scripts/imageFileInput/ImageFileInputView.js +354 -0
- package/dist/cjs/assets/scripts/imageFileInput/const/classNames.js +41 -0
- package/dist/cjs/assets/scripts/imageFileInput/const/index.js +27 -0
- package/dist/cjs/assets/scripts/imageFileInput/const/types.js +13 -0
- package/dist/cjs/assets/scripts/imageFileInput/index.js +44 -0
- package/dist/cjs/assets/scripts/index.js +30 -0
- package/dist/cjs/assets/scripts/modal/Modal.js +116 -0
- package/dist/cjs/assets/scripts/modal/ModalActions.js +128 -0
- package/dist/cjs/assets/scripts/modal/ModalContent.js +46 -0
- package/dist/cjs/assets/scripts/modal/ModalHeader.js +115 -0
- package/dist/cjs/assets/scripts/modal/const/classNames.js +41 -0
- package/dist/cjs/assets/scripts/modal/const/index.js +27 -0
- package/dist/cjs/assets/scripts/modal/const/types.js +5 -0
- package/dist/cjs/assets/scripts/modal/index.js +61 -0
- package/dist/cjs/assets/scripts/modal/utils/contentUtils.js +35 -0
- package/dist/cjs/assets/scripts/notification/FloatingNotification.js +180 -0
- package/dist/cjs/assets/scripts/notification/FullWidthNotification.js +120 -0
- package/dist/cjs/assets/scripts/notification/MessageNotification.js +146 -0
- package/dist/cjs/assets/scripts/notification/Notification.js +116 -0
- package/dist/cjs/assets/scripts/notification/const/classNames.js +50 -0
- package/dist/cjs/assets/scripts/notification/const/icons.js +45 -0
- package/dist/cjs/assets/scripts/notification/const/index.js +87 -0
- package/dist/cjs/assets/scripts/notification/const/sizes.js +54 -0
- package/dist/cjs/assets/scripts/notification/const/types.js +14 -0
- package/dist/cjs/assets/scripts/notification/index.js +92 -0
- package/dist/cjs/assets/scripts/notification/utils.js +92 -0
- package/dist/cjs/assets/scripts/progress-bar/ProgressBar.js +272 -0
- package/dist/cjs/assets/scripts/progress-bar/index.js +12 -0
- package/dist/cjs/assets/scripts/selectBox.js +229 -0
- package/dist/cjs/assets/scripts/shared/ButtonCloseX.js +46 -0
- package/dist/cjs/assets/scripts/tab.js +40 -0
- package/dist/cjs/assets/scripts/tag/Tag.js +268 -0
- package/dist/cjs/assets/scripts/tag/const/classNames.js +24 -0
- package/dist/cjs/assets/scripts/tag/const/index.js +38 -0
- package/dist/cjs/assets/scripts/tag/const/sizes.js +13 -0
- package/dist/cjs/assets/scripts/tag/const/types.js +5 -0
- package/dist/cjs/assets/scripts/tag/index.js +44 -0
- package/dist/cjs/assets/scripts/tooltip/Tooltip.js +380 -0
- package/dist/cjs/assets/scripts/tooltip/TooltipLayerManager.js +84 -0
- package/dist/cjs/assets/scripts/tooltip/const/classNames.js +29 -0
- package/dist/cjs/assets/scripts/tooltip/const/constants.js +56 -0
- package/dist/cjs/assets/scripts/tooltip/const/icons.js +15 -0
- package/dist/cjs/assets/scripts/tooltip/const/index.js +123 -0
- package/dist/cjs/assets/scripts/tooltip/const/templates.js +49 -0
- package/dist/cjs/assets/scripts/tooltip/const/types.js +5 -0
- package/dist/cjs/assets/scripts/tooltip/index.js +57 -0
- package/dist/cjs/assets/scripts/tooltip/utils.js +41 -0
- package/dist/cjs/assets/scripts/utils/debounce.js +33 -0
- package/dist/cjs/assets/scripts/utils/unifiedBox/domRenderer.js +384 -0
- package/dist/cjs/assets/scripts/utils/unifiedBox/dropdownModel.js +326 -0
- package/dist/cjs/assets/scripts/utils/unifiedBox/unifiedBoxController.js +649 -0
- package/dist/cjs/assets/scripts/utils/unifiedBox/unifiedBoxManager.js +669 -0
- 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 +4 -4
- 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/InputBase.js +3 -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 +8 -5
- 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 +183 -0
- package/dist/esm/assets/scripts/datePicker.js +699 -0
- package/dist/esm/assets/scripts/featuredIcon.js +90 -0
- package/dist/esm/assets/scripts/fileInput/const/classNames.js +22 -0
- package/dist/esm/assets/scripts/fileInput/const/index.js +2 -0
- package/dist/esm/assets/scripts/fileInput/const/types.js +7 -0
- 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 +9 -0
- package/dist/esm/assets/scripts/imageFileInput/ImageFileInput.js +182 -0
- package/dist/esm/assets/scripts/imageFileInput/ImageFileInputModel.js +250 -0
- package/dist/esm/assets/scripts/imageFileInput/ImageFileInputView.js +349 -0
- package/dist/esm/assets/scripts/imageFileInput/const/classNames.js +30 -0
- package/dist/esm/assets/scripts/imageFileInput/const/index.js +2 -0
- package/dist/esm/assets/scripts/imageFileInput/const/types.js +7 -0
- package/dist/esm/assets/scripts/imageFileInput/index.js +9 -0
- package/dist/esm/assets/scripts/index.js +28 -0
- package/dist/esm/assets/scripts/modal/Modal.js +110 -0
- package/dist/esm/assets/scripts/modal/ModalActions.js +123 -0
- package/dist/esm/assets/scripts/modal/ModalContent.js +41 -0
- package/dist/esm/assets/scripts/modal/ModalHeader.js +110 -0
- package/dist/esm/assets/scripts/modal/const/classNames.js +31 -0
- package/dist/esm/assets/scripts/modal/const/index.js +2 -0
- package/dist/esm/assets/scripts/modal/const/types.js +1 -0
- package/dist/esm/assets/scripts/modal/index.js +15 -0
- package/dist/esm/assets/scripts/modal/utils/contentUtils.js +28 -0
- package/dist/esm/assets/scripts/notification/FloatingNotification.js +176 -0
- package/dist/esm/assets/scripts/notification/FullWidthNotification.js +115 -0
- package/dist/esm/assets/scripts/notification/MessageNotification.js +141 -0
- package/dist/esm/assets/scripts/notification/Notification.js +111 -0
- package/dist/esm/assets/scripts/notification/const/classNames.js +44 -0
- package/dist/esm/assets/scripts/notification/const/icons.js +39 -0
- package/dist/esm/assets/scripts/notification/const/index.js +4 -0
- package/dist/esm/assets/scripts/notification/const/sizes.js +48 -0
- package/dist/esm/assets/scripts/notification/const/types.js +8 -0
- package/dist/esm/assets/scripts/notification/index.js +11 -0
- package/dist/esm/assets/scripts/notification/utils.js +79 -0
- package/dist/esm/assets/scripts/progress-bar/ProgressBar.js +267 -0
- package/dist/esm/assets/scripts/progress-bar/index.js +1 -0
- package/dist/esm/assets/scripts/selectBox.js +224 -0
- package/dist/esm/assets/scripts/shared/ButtonCloseX.js +38 -0
- package/dist/esm/assets/scripts/tab.js +35 -0
- package/dist/esm/assets/scripts/tag/Tag.js +263 -0
- package/dist/esm/assets/scripts/tag/const/classNames.js +16 -0
- package/dist/esm/assets/scripts/tag/const/index.js +3 -0
- package/dist/esm/assets/scripts/tag/const/sizes.js +7 -0
- package/dist/esm/assets/scripts/tag/const/types.js +1 -0
- package/dist/esm/assets/scripts/tag/index.js +9 -0
- package/dist/esm/assets/scripts/tooltip/Tooltip.js +375 -0
- package/dist/esm/assets/scripts/tooltip/TooltipLayerManager.js +79 -0
- package/dist/esm/assets/scripts/tooltip/const/classNames.js +23 -0
- package/dist/esm/assets/scripts/tooltip/const/constants.js +50 -0
- package/dist/esm/assets/scripts/tooltip/const/icons.js +9 -0
- package/dist/esm/assets/scripts/tooltip/const/index.js +4 -0
- package/dist/esm/assets/scripts/tooltip/const/templates.js +42 -0
- package/dist/esm/assets/scripts/tooltip/const/types.js +1 -0
- package/dist/esm/assets/scripts/tooltip/index.js +10 -0
- package/dist/esm/assets/scripts/tooltip/utils.js +35 -0
- package/dist/esm/assets/scripts/utils/debounce.js +27 -0
- package/dist/esm/assets/scripts/utils/unifiedBox/domRenderer.js +379 -0
- package/dist/esm/assets/scripts/utils/unifiedBox/dropdownModel.js +320 -0
- package/dist/esm/assets/scripts/utils/unifiedBox/unifiedBoxController.js +644 -0
- package/dist/esm/assets/scripts/utils/unifiedBox/unifiedBoxManager.js +664 -0
- 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 +6 -4
- 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 +6 -4
- 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 +12 -8
- 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/temp/assets/scripts/imageFileInput/ImageFileInput.d.ts +63 -0
- package/dist/temp/assets/scripts/imageFileInput/ImageFileInput.js +186 -0
- package/dist/temp/assets/scripts/imageFileInput/ImageFileInputModel.d.ts +73 -0
- package/dist/temp/assets/scripts/imageFileInput/ImageFileInputModel.js +234 -0
- package/dist/temp/assets/scripts/imageFileInput/ImageFileInputView.d.ts +79 -0
- 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/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/temp/assets/scripts/utils/unifiedBox/domRenderer.d.ts +107 -0
- package/dist/temp/assets/scripts/utils/unifiedBox/domRenderer.js +376 -0
- package/dist/temp/assets/scripts/utils/unifiedBox/dropdownModel.d.ts +142 -0
- package/dist/temp/assets/scripts/utils/unifiedBox/dropdownModel.js +311 -0
- package/dist/temp/assets/scripts/utils/unifiedBox/unifiedBoxController.d.ts +156 -0
- package/dist/temp/assets/scripts/utils/unifiedBox/unifiedBoxController.js +627 -0
- package/dist/temp/assets/scripts/utils/unifiedBox/unifiedBoxManager.d.ts +95 -0
- 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 +60 -0
- package/dist/types/assets/scripts/datePicker.d.ts +86 -0
- package/dist/types/assets/scripts/featuredIcon.d.ts +22 -0
- package/dist/types/assets/scripts/fileInput/const/classNames.d.ts +15 -0
- package/dist/types/assets/scripts/fileInput/const/index.d.ts +2 -0
- package/dist/types/assets/scripts/fileInput/const/types.d.ts +88 -0
- 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 +3 -0
- package/dist/types/assets/scripts/imageFileInput/ImageFileInput.d.ts +63 -0
- package/dist/types/assets/scripts/imageFileInput/ImageFileInputModel.d.ts +73 -0
- package/dist/types/assets/scripts/imageFileInput/ImageFileInputView.d.ts +79 -0
- package/dist/types/assets/scripts/imageFileInput/const/classNames.d.ts +19 -0
- package/dist/types/assets/scripts/imageFileInput/const/index.d.ts +2 -0
- package/dist/types/assets/scripts/imageFileInput/const/types.d.ts +125 -0
- package/dist/types/assets/scripts/imageFileInput/index.d.ts +3 -0
- package/dist/types/assets/scripts/index.d.ts +32 -0
- package/dist/types/assets/scripts/modal/Modal.d.ts +27 -0
- package/dist/types/assets/scripts/modal/ModalActions.d.ts +18 -0
- package/dist/types/assets/scripts/modal/ModalContent.d.ts +13 -0
- package/dist/types/assets/scripts/modal/ModalHeader.d.ts +15 -0
- package/dist/types/assets/scripts/modal/const/classNames.d.ts +22 -0
- package/dist/types/assets/scripts/modal/const/index.d.ts +2 -0
- package/dist/types/assets/scripts/modal/const/types.d.ts +61 -0
- package/dist/types/assets/scripts/modal/index.d.ts +7 -0
- package/dist/types/assets/scripts/modal/utils/contentUtils.d.ts +10 -0
- package/dist/types/assets/scripts/notification/FloatingNotification.d.ts +24 -0
- package/dist/types/assets/scripts/notification/FullWidthNotification.d.ts +21 -0
- package/dist/types/assets/scripts/notification/MessageNotification.d.ts +22 -0
- package/dist/types/assets/scripts/notification/Notification.d.ts +21 -0
- package/dist/types/assets/scripts/notification/const/classNames.d.ts +43 -0
- package/dist/types/assets/scripts/notification/const/icons.d.ts +25 -0
- package/dist/types/assets/scripts/notification/const/index.d.ts +5 -0
- package/dist/types/assets/scripts/notification/const/sizes.d.ts +32 -0
- package/dist/types/assets/scripts/notification/const/types.d.ts +19 -0
- package/dist/types/assets/scripts/notification/index.d.ts +7 -0
- package/dist/types/assets/scripts/notification/utils.d.ts +8 -0
- package/dist/types/assets/scripts/progress-bar/ProgressBar.d.ts +67 -0
- package/dist/types/assets/scripts/progress-bar/index.d.ts +1 -0
- package/dist/types/assets/scripts/selectBox.d.ts +50 -0
- package/dist/types/assets/scripts/shared/ButtonCloseX.d.ts +5 -0
- package/dist/types/assets/scripts/slider.d.ts +0 -1
- package/dist/types/assets/scripts/tab.d.ts +7 -0
- package/dist/types/assets/scripts/tag/Tag.d.ts +27 -0
- package/dist/types/assets/scripts/tag/const/classNames.d.ts +11 -0
- package/dist/types/assets/scripts/tag/const/index.d.ts +3 -0
- package/dist/types/assets/scripts/tag/const/sizes.d.ts +7 -0
- package/dist/types/assets/scripts/tag/const/types.d.ts +33 -0
- package/dist/types/assets/scripts/tag/index.d.ts +3 -0
- package/dist/types/assets/scripts/tooltip/Tooltip.d.ts +54 -0
- package/dist/types/assets/scripts/tooltip/TooltipLayerManager.d.ts +21 -0
- package/dist/types/assets/scripts/tooltip/const/classNames.d.ts +17 -0
- package/dist/types/assets/scripts/tooltip/const/constants.d.ts +33 -0
- package/dist/types/assets/scripts/tooltip/const/icons.d.ts +4 -0
- package/dist/types/assets/scripts/tooltip/const/index.d.ts +5 -0
- package/dist/types/assets/scripts/tooltip/const/templates.d.ts +16 -0
- package/dist/types/assets/scripts/tooltip/const/types.d.ts +14 -0
- package/dist/types/assets/scripts/tooltip/index.d.ts +6 -0
- package/dist/types/assets/scripts/tooltip/utils.d.ts +2 -0
- 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 +9 -11
- 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 +7 -5
- 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 +115 -24
- package/package.json +50 -77
- package/mcp/bin/server.js +0 -67
- package/mcp/bin/server.mjs +0 -14
- package/mcp/bin/tools/getComponentHtml.d.ts +0 -3
- package/mcp/bin/tools/getComponentHtml.js +0 -30
- package/mcp/bin/tools/getComponentProps.d.ts +0 -3
- package/mcp/bin/tools/getComponentProps.js +0 -16
- package/mcp/bin/tools/listComponents.d.ts +0 -3
- package/mcp/bin/tools/listComponents.js +0 -15
- package/mcp/bin/tools/ping.d.ts +0 -11
- package/mcp/bin/tools/ping.js +0 -30
- package/mcp/bin/tools/searchComponent.d.ts +0 -3
- package/mcp/bin/tools/searchComponent.js +0 -20
- package/mcp/bin/tools/validateHtml.d.ts +0 -10
- package/mcp/bin/tools/validateHtml.js +0 -142
- package/mcp/bin/types.d.ts +0 -28
- package/mcp/bin/types.js +0 -5
- package/mcp/bin/utils/dataLoader.d.ts +0 -11
- package/mcp/bin/utils/dataLoader.js +0 -68
- package/mcp/bin/utils/logger.d.ts +0 -18
- package/mcp/bin/utils/logger.js +0 -27
- package/mcp/bin/utils/response.d.ts +0 -23
- package/mcp/bin/utils/response.js +0 -31
- package/mcp/bin/version.d.ts +0 -1
- package/mcp/bin/version.js +0 -4
- package/mcp/data/.gitkeep +0 -0
- package/mcp/data/_meta.json +0 -7
- package/mcp/data/badge-group.json +0 -73
- package/mcp/data/badge.json +0 -86
- package/mcp/data/bread-crumb.json +0 -22
- package/mcp/data/breadcrumb.json +0 -31
- package/mcp/data/button-group.json +0 -65
- package/mcp/data/button.json +0 -114
- package/mcp/data/carousel-arrow.json +0 -59
- package/mcp/data/carousel-number-group.json +0 -57
- package/mcp/data/carousel.json +0 -22
- package/mcp/data/checkbox.json +0 -31
- package/mcp/data/combobox.json +0 -114
- package/mcp/data/date-picker.json +0 -77
- package/mcp/data/divider.json +0 -56
- package/mcp/data/dot.json +0 -55
- package/mcp/data/dropdown.json +0 -81
- package/mcp/data/empty-state.json +0 -34
- package/mcp/data/featured-icon.json +0 -83
- package/mcp/data/file-input.json +0 -76
- package/mcp/data/horizontal-tab.json +0 -71
- package/mcp/data/image-file-input.json +0 -97
- package/mcp/data/input.json +0 -104
- package/mcp/data/modal.json +0 -85
- package/mcp/data/notification.json +0 -116
- package/mcp/data/number-input.json +0 -128
- package/mcp/data/pagination.json +0 -65
- package/mcp/data/password-input.json +0 -47
- package/mcp/data/progress-bar.json +0 -51
- package/mcp/data/progress-circle.json +0 -54
- package/mcp/data/radio.json +0 -31
- package/mcp/data/range-date-picker-with-buttons.json +0 -64
- package/mcp/data/range-date-picker.json +0 -55
- package/mcp/data/select-dropdown.json +0 -32
- package/mcp/data/select.json +0 -64
- package/mcp/data/selectbox.json +0 -129
- package/mcp/data/slider.json +0 -57
- package/mcp/data/spinner.json +0 -54
- package/mcp/data/switch.json +0 -71
- package/mcp/data/tab.json +0 -122
- package/mcp/data/tag.json +0 -66
- package/mcp/data/textarea.json +0 -88
- package/mcp/data/toggle.json +0 -59
- package/mcp/data/tooltip.json +0 -123
- package/mcp/data/vertical-tab.json +0 -64
- package/mcp/templates/.mcp.json.example +0 -8
- package/mcp/templates/README.md +0 -31
- /package/{mcp/bin/server.d.ts → dist/temp/assets/scripts/modal/const/types.js} +0 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
24
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
25
|
+
if (ar || !(i in from)) {
|
|
26
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
27
|
+
ar[i] = from[i];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
31
|
+
};
|
|
32
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
33
|
+
import { ChevronDown } from '@ncds/ui-admin-icon';
|
|
34
|
+
import classNames from 'classnames';
|
|
35
|
+
import { forwardRef, useCallback, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, } from 'react';
|
|
36
|
+
import { COLOR } from '../../../constant/color';
|
|
37
|
+
import { useDropdown, useScrollLock } from '../../hooks/dropdown';
|
|
38
|
+
import { useMultiSelect } from '../../utils/dropdown/multiSelect';
|
|
39
|
+
import { SelectDropdown } from '../select-dropdown';
|
|
40
|
+
import { HintText } from '../shared/hintText/HintText';
|
|
41
|
+
import { Tag } from '../tag';
|
|
42
|
+
var ICON_SIZE_XS = 14;
|
|
43
|
+
var ICON_SIZE_SM = 16;
|
|
44
|
+
var DEFAULT_MAX_HEIGHT = 275;
|
|
45
|
+
function computeNewValue(option, value, multiple) {
|
|
46
|
+
if (multiple) {
|
|
47
|
+
var currentValues = Array.isArray(value) ? value : [];
|
|
48
|
+
if (currentValues.includes(option.id)) {
|
|
49
|
+
return currentValues.filter(function (v) { return v !== option.id; });
|
|
50
|
+
}
|
|
51
|
+
return __spreadArray(__spreadArray([], currentValues, true), [option.id], false);
|
|
52
|
+
}
|
|
53
|
+
return option.id;
|
|
54
|
+
}
|
|
55
|
+
function notifyRegister(register, newValue, multiple) {
|
|
56
|
+
if (!(register === null || register === void 0 ? void 0 : register.onChange))
|
|
57
|
+
return;
|
|
58
|
+
register.onChange({
|
|
59
|
+
target: {
|
|
60
|
+
value: multiple ? JSON.stringify(newValue) : newValue,
|
|
61
|
+
name: register.name,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function DisplayValue(_a) {
|
|
66
|
+
var displayValue = _a.displayValue;
|
|
67
|
+
if (typeof displayValue === 'string') {
|
|
68
|
+
return _jsx("span", __assign({ className: "ncua-selectbox__value-text" }, { children: displayValue }));
|
|
69
|
+
}
|
|
70
|
+
return (_jsxs("div", __assign({ className: "ncua-selectbox__value-container" }, { children: [displayValue.icon && (_jsx("span", __assign({ className: "ncua-selectbox__value-icon" }, { children: _jsx(displayValue.icon, { width: 16, height: 16 }) }))), _jsx("span", __assign({ className: "ncua-selectbox__value-text" }, { children: displayValue.label }))] })));
|
|
71
|
+
}
|
|
72
|
+
var SelectBox = forwardRef(function (_a, ref) {
|
|
73
|
+
var _b = _a.placeholder, placeholder = _b === void 0 ? '선택하세요' : _b, _c = _a.disabledPlaceholder, disabledPlaceholder = _c === void 0 ? false : _c, hintText = _a.hintText, _d = _a.size, size = _d === void 0 ? 'xs' : _d, _e = _a.type, type = _e === void 0 ? 'default' : _e, _f = _a.autoWidth, autoWidth = _f === void 0 ? true : _f, _g = _a.destructive, destructive = _g === void 0 ? false : _g, value = _a.value, _h = _a.optionItems, optionItems = _h === void 0 ? [] : _h, _j = _a.disabled, disabled = _j === void 0 ? false : _j, _k = _a.maxHeight, maxHeight = _k === void 0 ? DEFAULT_MAX_HEIGHT : _k, _l = _a.multiple, multiple = _l === void 0 ? false : _l, _m = _a.align, align = _m === void 0 ? 'left' : _m, id = _a.id, className = _a.className, children = _a.children, register = _a.register, onChange = _a.onChange, onEdit = _a.onEdit, props = __rest(_a, ["placeholder", "disabledPlaceholder", "hintText", "size", "type", "autoWidth", "destructive", "value", "optionItems", "disabled", "maxHeight", "multiple", "align", "id", "className", "children", "register", "onChange", "onEdit"]);
|
|
74
|
+
var internalRef = useRef(null);
|
|
75
|
+
var dropdownRef = useRef(null);
|
|
76
|
+
var _o = useState([]), selectedTags = _o[0], setSelectedTags = _o[1];
|
|
77
|
+
var selectedOption = useMemo(function () {
|
|
78
|
+
if (multiple)
|
|
79
|
+
return null;
|
|
80
|
+
return optionItems.find(function (option) { return option.id === value; });
|
|
81
|
+
}, [optionItems, value, multiple]);
|
|
82
|
+
var displayValue = useMemo(function () {
|
|
83
|
+
if (multiple) {
|
|
84
|
+
return placeholder;
|
|
85
|
+
}
|
|
86
|
+
return selectedOption ? selectedOption : placeholder;
|
|
87
|
+
}, [multiple, selectedOption, placeholder]);
|
|
88
|
+
var handleOptionSelect = function (option) {
|
|
89
|
+
if (disabled)
|
|
90
|
+
return;
|
|
91
|
+
var newValue = computeNewValue(option, value, multiple);
|
|
92
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
93
|
+
notifyRegister(register, newValue, multiple);
|
|
94
|
+
};
|
|
95
|
+
var _p = useDropdown({
|
|
96
|
+
triggerRef: internalRef,
|
|
97
|
+
dropdownRef: dropdownRef,
|
|
98
|
+
maxHeight: maxHeight,
|
|
99
|
+
itemCount: optionItems.length,
|
|
100
|
+
optionItems: optionItems,
|
|
101
|
+
disabled: disabled,
|
|
102
|
+
multiple: multiple,
|
|
103
|
+
onSelect: handleOptionSelect,
|
|
104
|
+
}), isOpen = _p.isOpen, dropdownDirection = _p.direction, focusedIndex = _p.focusedIndex, toggleDropdown = _p.toggleDropdown, closeDropdown = _p.closeDropdown, handleKeyDown = _p.handleKeyDown, handleDropdownSelect = _p.handleOptionSelect, handleMouseMove = _p.handleMouseMove, isKeyboardNavigation = _p.isKeyboardNavigation, setFocusedIndex = _p.setFocusedIndex;
|
|
105
|
+
var activeDescendantId = useMemo(function () {
|
|
106
|
+
if (!isOpen || focusedIndex < 0 || focusedIndex >= optionItems.length) {
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
var focusedOption = optionItems[focusedIndex];
|
|
110
|
+
return "selectbox-options-".concat(id || 'default', "-").concat(focusedOption.id);
|
|
111
|
+
}, [isOpen, focusedIndex, optionItems, id]);
|
|
112
|
+
var handleOptionHover = useCallback(function (index) {
|
|
113
|
+
handleMouseMove();
|
|
114
|
+
setFocusedIndex(index);
|
|
115
|
+
}, [handleMouseMove, setFocusedIndex]);
|
|
116
|
+
// Multiple select 관련 로직
|
|
117
|
+
var currentSelectedValues = multiple && Array.isArray(value) ? value : [];
|
|
118
|
+
var _q = useMultiSelect(currentSelectedValues, optionItems), selectAllButtonText = _q.buttonText, toggleSelectAll = _q.toggleSelectAll, getSelectedTagsData = _q.getSelectedTagsData, removeTag = _q.removeTag;
|
|
119
|
+
var handleSelectAll = function () {
|
|
120
|
+
if (!multiple || !onChange)
|
|
121
|
+
return;
|
|
122
|
+
var newSelectedValues = toggleSelectAll();
|
|
123
|
+
onChange(newSelectedValues);
|
|
124
|
+
};
|
|
125
|
+
var handleEdit = function () {
|
|
126
|
+
onEdit === null || onEdit === void 0 ? void 0 : onEdit();
|
|
127
|
+
};
|
|
128
|
+
var handleComplete = function () {
|
|
129
|
+
if (multiple) {
|
|
130
|
+
var tags = getSelectedTagsData();
|
|
131
|
+
setSelectedTags(tags);
|
|
132
|
+
}
|
|
133
|
+
closeDropdown();
|
|
134
|
+
};
|
|
135
|
+
var handleRemoveTag = function (tagId) {
|
|
136
|
+
if (!onChange)
|
|
137
|
+
return;
|
|
138
|
+
if (multiple) {
|
|
139
|
+
var newSelectedValues = removeTag(tagId);
|
|
140
|
+
onChange(newSelectedValues);
|
|
141
|
+
setSelectedTags(function (prev) { return prev.filter(function (tag) { return tag.id !== tagId; }); });
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
useScrollLock(isOpen, dropdownRef);
|
|
145
|
+
useLayoutEffect(function () {
|
|
146
|
+
if (autoWidth && isOpen && dropdownRef.current && internalRef.current) {
|
|
147
|
+
var dropdownWidth = dropdownRef.current.offsetWidth;
|
|
148
|
+
internalRef.current.style.width = "".concat(dropdownWidth, "px");
|
|
149
|
+
}
|
|
150
|
+
}, [autoWidth, isOpen, optionItems]);
|
|
151
|
+
useImperativeHandle(ref, function () { return internalRef.current; }, []);
|
|
152
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", __assign({ ref: internalRef, className: classNames('ncua-selectbox', "ncua-selectbox--".concat(size), {
|
|
153
|
+
'ncua-selectbox--open': isOpen,
|
|
154
|
+
'ncua-selectbox--disabled': disabled,
|
|
155
|
+
'ncua-selectbox--simple': type === 'simple',
|
|
156
|
+
'ncua-selectbox--multiple': multiple,
|
|
157
|
+
destructive: destructive,
|
|
158
|
+
}, className) }, props, { children: [_jsxs("div", __assign({ className: classNames('ncua-selectbox__content'), onClick: toggleDropdown, onKeyDown: handleKeyDown, tabIndex: disabled ? -1 : 0, role: "combobox", "aria-expanded": isOpen, "aria-haspopup": "listbox", "aria-controls": "selectbox-options-".concat(id || 'default'), "aria-disabled": disabled, "aria-label": selectedOption ? selectedOption.label : placeholder, "aria-activedescendant": activeDescendantId }, { children: [_jsxs("div", __assign({ className: "ncua-selectbox__content-inner" }, { children: [_jsx("div", __assign({ className: "ncua-selectbox__value" }, { children: _jsx(DisplayValue, { displayValue: displayValue }) })), _jsx(ChevronDown, { width: size === 'xs' ? ICON_SIZE_XS : ICON_SIZE_SM, height: size === 'xs' ? ICON_SIZE_XS : ICON_SIZE_SM, color: disabled ? COLOR.gray300 : COLOR.gray500, className: classNames('ncua-selectbox__arrow', {
|
|
159
|
+
'ncua-selectbox__arrow--up': isOpen,
|
|
160
|
+
}) })] })), _jsx(SelectDropdown, __assign({ ref: dropdownRef, isOpen: isOpen, direction: dropdownDirection, size: size, options: optionItems, value: value, focusedIndex: focusedIndex, maxHeight: maxHeight, listboxId: "selectbox-options-".concat(id || 'default'), multiple: multiple, showFooterButtons: multiple, selectAllButtonText: selectAllButtonText, componentType: "selectbox", isKeyboardNavigation: isKeyboardNavigation, activeDescendantId: activeDescendantId, align: align, onOptionSelect: handleDropdownSelect, onMouseMove: handleMouseMove, onOptionHover: handleOptionHover, onSelectAll: handleSelectAll, onEdit: handleEdit, onComplete: handleComplete }, { children: children }))] })), hintText && (_jsx(HintText, __assign({ destructive: destructive, className: "ncua-hint-text" }, { children: hintText }))), register && (_jsx("input", __assign({ type: "hidden" }, register, { value: multiple ? JSON.stringify(value || []) : String(value || '') })))] })), selectedTags.length > 0 && (_jsx("div", __assign({ className: "ncua-selectbox__tags" }, { children: selectedTags.map(function (tag) { return (_jsx(Tag, { text: tag.label, size: "sm", close: true, onButtonClick: function () { return handleRemoveTag(tag.id); } }, tag.id)); }) })))] }));
|
|
161
|
+
});
|
|
162
|
+
SelectBox.displayName = 'SelectBox';
|
|
163
|
+
export { DEFAULT_MAX_HEIGHT, SelectBox };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SelectBox, type SelectBoxProps } from './SelectBox';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SelectBox } from './SelectBox';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface HintTextProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
as?: React.ElementType;
|
|
3
|
+
destructive?: boolean;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const HintText: ({ as: Component, children, className, destructive, ...props }: HintTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import classNames from 'classnames';
|
|
25
|
+
export var HintText = function (_a) {
|
|
26
|
+
var _b = _a.as, Component = _b === void 0 ? 'span' : _b, children = _a.children, className = _a.className, destructive = _a.destructive, props = __rest(_a, ["as", "children", "className", "destructive"]);
|
|
27
|
+
return (_jsx(Component, __assign({ className: classNames('ncua-hint-text', { destructive: destructive }, className) }, props, { children: children })));
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './HintText';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './HintText';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
2
|
+
as?: React.ElementType;
|
|
3
|
+
isRequired?: boolean;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const Label: ({ as: Component, children, className, isRequired, ...props }: LabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import classNames from 'classnames';
|
|
25
|
+
export var Label = function (_a) {
|
|
26
|
+
var _b = _a.as, Component = _b === void 0 ? 'label' : _b, children = _a.children, className = _a.className, isRequired = _a.isRequired, props = __rest(_a, ["as", "children", "className", "isRequired"]);
|
|
27
|
+
return (_jsx(Component, __assign({ className: classNames('ncua-label', { 'is-required': isRequired }, className) }, props, { children: children })));
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Label';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Label';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type SliderOptions } from '../../../assets/scripts/slider';
|
|
2
|
+
export type SliderLabelPosition = SliderOptions['labelPosition'];
|
|
3
|
+
export interface SliderProps {
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
step?: number;
|
|
7
|
+
value?: number | [number, number];
|
|
8
|
+
onChange?: (value: number | [number, number]) => void;
|
|
9
|
+
labelPosition?: SliderLabelPosition;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const Slider: ({ min, max, step, value, onChange, labelPosition, disabled, className, }: SliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default Slider;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
import { Slider as NcuaSlider } from '../../../assets/scripts/slider';
|
|
4
|
+
export var Slider = function (_a) {
|
|
5
|
+
var _b = _a.min, min = _b === void 0 ? 0 : _b, _c = _a.max, max = _c === void 0 ? 100 : _c, _d = _a.step, step = _d === void 0 ? 1 : _d, _e = _a.value, value = _e === void 0 ? 0 : _e, onChange = _a.onChange, labelPosition = _a.labelPosition, _f = _a.disabled, disabled = _f === void 0 ? false : _f, className = _a.className;
|
|
6
|
+
var containerRef = useRef(null);
|
|
7
|
+
var sliderInstanceRef = useRef(null);
|
|
8
|
+
useEffect(function () {
|
|
9
|
+
if (!containerRef.current)
|
|
10
|
+
return;
|
|
11
|
+
sliderInstanceRef.current = new NcuaSlider(containerRef.current, {
|
|
12
|
+
min: min,
|
|
13
|
+
max: max,
|
|
14
|
+
step: step,
|
|
15
|
+
value: value,
|
|
16
|
+
onChange: onChange,
|
|
17
|
+
labelPosition: labelPosition,
|
|
18
|
+
disabled: disabled,
|
|
19
|
+
});
|
|
20
|
+
return function () {
|
|
21
|
+
if (sliderInstanceRef.current) {
|
|
22
|
+
sliderInstanceRef.current.destroy();
|
|
23
|
+
sliderInstanceRef.current = null;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}, [typeof value, onChange, min, max, step, labelPosition]);
|
|
27
|
+
useEffect(function () {
|
|
28
|
+
if (sliderInstanceRef.current) {
|
|
29
|
+
sliderInstanceRef.current.setValue(value);
|
|
30
|
+
}
|
|
31
|
+
}, [sliderInstanceRef, value]);
|
|
32
|
+
useEffect(function () {
|
|
33
|
+
if (sliderInstanceRef.current) {
|
|
34
|
+
if (disabled) {
|
|
35
|
+
sliderInstanceRef.current.disable();
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
sliderInstanceRef.current.enable();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}, [disabled]);
|
|
42
|
+
return _jsx("div", { ref: containerRef, className: "ncua-slider ".concat(className || '') });
|
|
43
|
+
};
|
|
44
|
+
export default Slider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Slider';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Slider';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ElementType, ReactNode } from 'react';
|
|
2
|
+
interface SpinnerProps {
|
|
3
|
+
as?: ElementType;
|
|
4
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
backdrop?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const Spinner: ({ as, size, children, backdrop }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
var RenderText = function (_a) {
|
|
15
|
+
var _b = _a.as, Component = _b === void 0 ? 'p' : _b, children = _a.children;
|
|
16
|
+
return _jsx(Component, __assign({ className: "ncua-spinner__text" }, { children: children }));
|
|
17
|
+
};
|
|
18
|
+
export var Spinner = function (_a) {
|
|
19
|
+
var _b = _a.as, as = _b === void 0 ? 'p' : _b, _c = _a.size, size = _c === void 0 ? 'sm' : _c, children = _a.children, _d = _a.backdrop, backdrop = _d === void 0 ? false : _d;
|
|
20
|
+
return (_jsx("div", __assign({ className: classNames('ncua-spinner', "ncua-spinner--".concat(size), { 'ncua-spinner--backdrop': backdrop }) }, { children: _jsx("div", __assign({ className: "ncua-spinner__content" }, { children: children && _jsx(RenderText, __assign({ as: as }, { children: children })) })) })));
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Spinner';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Spinner';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ReactNode, type Ref } from 'react';
|
|
2
|
+
import type { Size } from '../../../constant/size';
|
|
3
|
+
type SwitchOption = {
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
value: string | boolean;
|
|
6
|
+
};
|
|
7
|
+
type SwitchSize = Extract<Size, 'xxs' | 'xs' | 'sm' | 'md'>;
|
|
8
|
+
type SwitchProps = {
|
|
9
|
+
size?: SwitchSize;
|
|
10
|
+
left: SwitchOption;
|
|
11
|
+
right: SwitchOption;
|
|
12
|
+
onChange?: (value: string | boolean) => void;
|
|
13
|
+
name: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
value?: string | boolean;
|
|
16
|
+
defaultValue?: string | boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
refs?: [Ref<HTMLInputElement>, Ref<HTMLInputElement>];
|
|
19
|
+
};
|
|
20
|
+
declare const Switch: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
21
|
+
export type { SwitchSize, SwitchProps };
|
|
22
|
+
export { Switch };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
import { forwardRef, useImperativeHandle, useRef, useState } from 'react';
|
|
15
|
+
var Switch = forwardRef(function (_a, ref) {
|
|
16
|
+
var _b;
|
|
17
|
+
var _c = _a.size, size = _c === void 0 ? 'xs' : _c, left = _a.left, right = _a.right, _d = _a.disabled, disabled = _d === void 0 ? false : _d, value = _a.value, _e = _a.defaultValue, defaultValue = _e === void 0 ? left.value : _e, onChange = _a.onChange, className = _a.className, name = _a.name, refs = _a.refs;
|
|
18
|
+
var leftInputRef = useRef(null);
|
|
19
|
+
useImperativeHandle(ref, function () { return leftInputRef.current; });
|
|
20
|
+
// 값을 문자열로 정규화하는 함수
|
|
21
|
+
var normalizeValue = function (val) {
|
|
22
|
+
return typeof val === 'boolean' ? String(val) : val;
|
|
23
|
+
};
|
|
24
|
+
// 유효한 사이즈인지 확인하는 함수
|
|
25
|
+
var getValidSize = function (size) {
|
|
26
|
+
var validSizes = ['xxs', 'xs', 'sm', 'md'];
|
|
27
|
+
return size && validSizes.includes(size) ? size : 'xs';
|
|
28
|
+
};
|
|
29
|
+
var isBooleanType = typeof left.value === 'boolean' && typeof right.value === 'boolean';
|
|
30
|
+
// 현재 값 처리
|
|
31
|
+
var getCurrentValue = function () {
|
|
32
|
+
if (value === undefined)
|
|
33
|
+
return undefined;
|
|
34
|
+
if (isBooleanType && typeof value === 'boolean') {
|
|
35
|
+
return normalizeValue(value ? left.value : right.value);
|
|
36
|
+
}
|
|
37
|
+
return normalizeValue(value);
|
|
38
|
+
};
|
|
39
|
+
var isControlled = getCurrentValue() !== undefined;
|
|
40
|
+
var _f = useState(normalizeValue(defaultValue)), internalValue = _f[0], setInternalValue = _f[1];
|
|
41
|
+
var currentValue = isControlled ? getCurrentValue() : internalValue;
|
|
42
|
+
var handleChange = function (newValue) {
|
|
43
|
+
if (!isControlled) {
|
|
44
|
+
setInternalValue(newValue);
|
|
45
|
+
}
|
|
46
|
+
if (!onChange)
|
|
47
|
+
return;
|
|
48
|
+
// 선택된 옵션 찾기
|
|
49
|
+
var selectedOption = newValue === normalizeValue(left.value) ? left : right;
|
|
50
|
+
if (isBooleanType && typeof value === 'boolean') {
|
|
51
|
+
onChange(newValue === normalizeValue(left.value));
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
onChange(selectedOption.value);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
return (_jsxs("div", __assign({ className: classNames('ncua-switch', "ncua-switch--".concat(getValidSize(size)), {
|
|
58
|
+
'ncua-switch--disabled': disabled,
|
|
59
|
+
}, className) }, { children: [_jsxs("label", __assign({ className: classNames('ncua-switch__option', 'ncua-switch__option--left', {
|
|
60
|
+
'ncua-switch__option--active': currentValue === normalizeValue(left.value),
|
|
61
|
+
'ncua-switch__option--inactive': currentValue !== normalizeValue(left.value),
|
|
62
|
+
}) }, { children: [_jsx("input", { type: "radio", ref: (_b = refs === null || refs === void 0 ? void 0 : refs[0]) !== null && _b !== void 0 ? _b : leftInputRef, name: name, value: normalizeValue(left.value), checked: currentValue === normalizeValue(left.value), disabled: disabled, className: "ncua-switch__radio ncua-switch__radio--left", onChange: function () { return handleChange(normalizeValue(left.value)); } }), _jsx("span", __assign({ className: "ncua-switch__label" }, { children: left.label }))] })), _jsxs("label", __assign({ className: classNames('ncua-switch__option', 'ncua-switch__option--right', {
|
|
63
|
+
'ncua-switch__option--active': currentValue === normalizeValue(right.value),
|
|
64
|
+
'ncua-switch__option--inactive': currentValue !== normalizeValue(right.value),
|
|
65
|
+
}) }, { children: [_jsx("input", { type: "radio", ref: refs === null || refs === void 0 ? void 0 : refs[1], name: name, value: normalizeValue(right.value), checked: currentValue === normalizeValue(right.value), disabled: disabled, className: "ncua-switch__radio ncua-switch__radio--right", onChange: function () { return handleChange(normalizeValue(right.value)); } }), _jsx("span", __assign({ className: "ncua-switch__label" }, { children: right.label }))] }))] })));
|
|
66
|
+
});
|
|
67
|
+
Switch.displayName = 'Switch';
|
|
68
|
+
export { Switch };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Switch } from './Switch';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type TabButtonProps, type TabSize, type TabType } from './TabButton';
|
|
2
|
+
type HorizontalTabProps = {
|
|
3
|
+
type?: Exclude<TabType, 'line-vertical'>;
|
|
4
|
+
size?: TabSize;
|
|
5
|
+
activeTab?: string;
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
menus?: TabButtonProps[];
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const HorizontalTab: ({ type, size, activeTab, fullWidth, menus, className, }: HorizontalTabProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export type { HorizontalTabProps };
|
|
12
|
+
export { HorizontalTab };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
import { uniqueId } from 'lodash-es';
|
|
15
|
+
import { Swiper, SwiperSlide } from 'swiper/react';
|
|
16
|
+
import { TabButton } from './TabButton';
|
|
17
|
+
var UNDERLINE_GAP = 16;
|
|
18
|
+
var DEFAULT_GAP = 8;
|
|
19
|
+
var HorizontalTab = function (_a) {
|
|
20
|
+
var _b = _a.type, type = _b === void 0 ? 'button-primary' : _b, _c = _a.size, size = _c === void 0 ? 'sm' : _c, activeTab = _a.activeTab, _d = _a.fullWidth, fullWidth = _d === void 0 ? false : _d, _e = _a.menus, menus = _e === void 0 ? [] : _e, className = _a.className;
|
|
21
|
+
var getTabGap = function (type) {
|
|
22
|
+
var _a;
|
|
23
|
+
var gap = {
|
|
24
|
+
underline: UNDERLINE_GAP,
|
|
25
|
+
};
|
|
26
|
+
return (_a = gap[type]) !== null && _a !== void 0 ? _a : DEFAULT_GAP;
|
|
27
|
+
};
|
|
28
|
+
if (!menus.length)
|
|
29
|
+
return null;
|
|
30
|
+
return (_jsx("div", __assign({ className: classNames('ncua-horizontal-tab', "ncua-horizontal-tab--".concat(type), "ncua-horizontal-tab--".concat(size), {
|
|
31
|
+
'ncua-horizontal-tab--fullWidth': fullWidth,
|
|
32
|
+
}, className) }, { children: _jsx(Swiper, __assign({ slidesPerView: "auto", spaceBetween: getTabGap(type) }, { children: menus.map(function (menu) {
|
|
33
|
+
var isActive = 'href' in menu && menu.href ? menu.href === activeTab : menu.id === activeTab;
|
|
34
|
+
return (_jsx(SwiperSlide, __assign({ className: "ncua-horizontal-tab__item" }, { children: _jsx(TabButton, __assign({}, menu, { isActive: isActive, tabButtonType: type, size: size })) }), uniqueId('horizontal-tab')));
|
|
35
|
+
}) })) })));
|
|
36
|
+
};
|
|
37
|
+
export { HorizontalTab };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { type BadgeProps } from '../badge/Badge';
|
|
3
|
+
type TabSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
type TabType = 'button-primary' | 'button-white' | 'underline' | 'underline-fill' | 'line-vertical';
|
|
5
|
+
type BaseTabButtonProps = {
|
|
6
|
+
id?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
size?: TabSize;
|
|
9
|
+
tabButtonType?: TabType;
|
|
10
|
+
isActive?: boolean;
|
|
11
|
+
badgeInfo?: BadgeProps;
|
|
12
|
+
className?: string;
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
type TabButtonAsButtonProps = BaseTabButtonProps & {
|
|
16
|
+
onClose?: (id: string) => void;
|
|
17
|
+
onClick?: (id: string) => void;
|
|
18
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'>;
|
|
19
|
+
type TabButtonAsLinkProps = BaseTabButtonProps & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
20
|
+
type TabButtonProps = TabButtonAsButtonProps | TabButtonAsLinkProps;
|
|
21
|
+
declare const TabButton: ({ id, label, size, tabButtonType, type, isActive, badgeInfo, className, children, ...props }: TabButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export type { TabSize, TabType, TabButtonAsButtonProps, TabButtonAsLinkProps, TabButtonProps };
|
|
23
|
+
export { TabButton };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
|
+
import { XClose } from '@ncds/ui-admin-icon';
|
|
25
|
+
import classNames from 'classnames';
|
|
26
|
+
import { Badge } from '../badge/Badge';
|
|
27
|
+
var TabButton = function (_a) {
|
|
28
|
+
var id = _a.id, label = _a.label, _b = _a.size, size = _b === void 0 ? 'sm' : _b, tabButtonType = _a.tabButtonType, type = _a.type, _c = _a.isActive, isActive = _c === void 0 ? false : _c, badgeInfo = _a.badgeInfo, className = _a.className, children = _a.children, props = __rest(_a, ["id", "label", "size", "tabButtonType", "type", "isActive", "badgeInfo", "className", "children"]);
|
|
29
|
+
var componentClassName = classNames('ncua-tab-button', { 'is-active': isActive }, className);
|
|
30
|
+
if ('href' in props && props.href) {
|
|
31
|
+
var _d = props, href = _d.href, _e = _d.target, target = _e === void 0 ? '_self' : _e, _onClick = _d.onClick, anchorProps = __rest(_d, ["href", "target", "onClick"]);
|
|
32
|
+
return (_jsxs("a", __assign({ className: componentClassName, href: href, target: target }, anchorProps, { children: [label, badgeInfo && _jsx(Badge, __assign({}, badgeInfo, { size: "xs" })), children] })));
|
|
33
|
+
}
|
|
34
|
+
var _f = props, onClick = _f.onClick, onClose = _f.onClose, buttonProps = __rest(_f, ["onClick", "onClose"]);
|
|
35
|
+
return (_jsxs(_Fragment, { children: [_jsxs("button", __assign({ type: "button", className: componentClassName, onClick: function () { return onClick === null || onClick === void 0 ? void 0 : onClick(id !== null && id !== void 0 ? id : ''); } }, buttonProps, { children: [label, badgeInfo && _jsx(Badge, __assign({}, badgeInfo, { size: "xs" })), children] })), onClose && (_jsx("button", __assign({ type: "button", className: "ncua-tab-close", onClick: function () { return onClose === null || onClose === void 0 ? void 0 : onClose(id !== null && id !== void 0 ? id : ''); } }, { children: _jsx(XClose, { width: 14, height: 14 }) })))] }));
|
|
36
|
+
};
|
|
37
|
+
export { TabButton };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type TabButtonProps } from './TabButton';
|
|
2
|
+
export type VerticalTabProps = {
|
|
3
|
+
type?: 'button-primary' | 'button-white' | 'line-vertical';
|
|
4
|
+
breakPoint?: 'mobile' | 'pc';
|
|
5
|
+
activeTab?: string;
|
|
6
|
+
menus?: TabButtonProps[];
|
|
7
|
+
onSelect?: (value: string) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const VerticalTab: ({ type, breakPoint, activeTab, menus, onSelect, }: VerticalTabProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
import { Select } from '../select/Select';
|
|
15
|
+
import { TabButton } from './TabButton';
|
|
16
|
+
export var VerticalTab = function (_a) {
|
|
17
|
+
var _b = _a.type, type = _b === void 0 ? 'button-primary' : _b, _c = _a.breakPoint, breakPoint = _c === void 0 ? 'pc' : _c, activeTab = _a.activeTab, menus = _a.menus, onSelect = _a.onSelect;
|
|
18
|
+
var handleSelectChange = function (e) {
|
|
19
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(e.target.value);
|
|
20
|
+
};
|
|
21
|
+
var optionItems = (menus === null || menus === void 0 ? void 0 : menus.map(function (menu) { return ({
|
|
22
|
+
id: menu.id || '',
|
|
23
|
+
label: menu.label || '',
|
|
24
|
+
}); })) || [];
|
|
25
|
+
if (breakPoint === 'mobile') {
|
|
26
|
+
return _jsx(Select, { value: activeTab, onChange: handleSelectChange, optionItems: optionItems, size: "md" });
|
|
27
|
+
}
|
|
28
|
+
return (_jsx("div", __assign({ className: classNames('ncua-vertical-tab', "ncua-vertical-tab--".concat(type)) }, { children: menus === null || menus === void 0 ? void 0 : menus.map(function (menu) {
|
|
29
|
+
var isActive = 'href' in menu && menu.href ? menu.href === activeTab : menu.id === activeTab;
|
|
30
|
+
return _jsx(TabButton, __assign({}, menu, { isActive: isActive, tabButtonType: type, size: "md" }), menu.id);
|
|
31
|
+
}) })));
|
|
32
|
+
};
|