@ncds/ui-admin 1.8.0 → 1.8.2
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/src/components/badge/index.js +11 -0
- package/dist/cjs/src/components/combo-box/ComboBox.js +1 -0
- package/dist/cjs/src/components/date-picker/index.js +11 -0
- package/dist/cjs/src/components/image-file-input/components/index.js +16 -0
- package/dist/cjs/src/components/image-file-input/index.js +11 -0
- package/dist/cjs/src/components/progress-bar/components/index.js +27 -0
- package/dist/cjs/src/components/progress-bar/hooks/index.js +16 -0
- package/dist/cjs/src/components/progress-bar/index.js +33 -0
- package/dist/cjs/src/components/select/Select.js +0 -1
- package/dist/cjs/src/components/select-dropdown/index.js +11 -7
- package/dist/cjs/src/components/switch/index.js +11 -7
- package/dist/cjs/src/components/table/Table.js +128 -16
- package/dist/cjs/src/components/tooltip/Tooltip.js +170 -104
- package/dist/cjs/src/hooks/dropdown/index.js +61 -37
- package/dist/cjs/src/hooks/index.js +31 -25
- package/dist/cjs/vitest.config.js +13 -0
- package/dist/esm/src/components/badge/index.js +2 -1
- package/dist/esm/src/components/combo-box/ComboBox.js +1 -0
- package/dist/esm/src/components/date-picker/index.js +1 -0
- package/dist/esm/src/components/empty-state/EmptyState.js +2 -3
- package/dist/esm/src/components/image-file-input/components/index.js +1 -0
- package/dist/esm/src/components/image-file-input/index.js +2 -1
- package/dist/esm/src/components/progress-bar/components/index.js +2 -0
- package/dist/esm/src/components/progress-bar/hooks/index.js +1 -0
- package/dist/esm/src/components/progress-bar/index.js +4 -1
- package/dist/esm/src/components/select/Select.js +0 -1
- package/dist/esm/src/components/select-dropdown/index.js +1 -1
- package/dist/esm/src/components/switch/index.js +1 -1
- package/dist/esm/src/components/table/Table.js +129 -17
- package/dist/esm/src/components/tag/Tag.js +2 -3
- package/dist/esm/src/components/tooltip/Tooltip.js +172 -106
- package/dist/esm/src/hooks/dropdown/index.js +6 -6
- package/dist/esm/src/hooks/index.js +3 -3
- package/dist/esm/src/types/component-meta.js +2 -0
- package/dist/esm/vitest.config.js +7 -0
- package/dist/temp/src/components/badge/index.d.ts +1 -0
- package/dist/temp/src/components/badge/index.js +1 -0
- package/dist/temp/src/components/combo-box/ComboBox.js +1 -0
- package/dist/temp/src/components/date-picker/index.d.ts +1 -0
- package/dist/temp/src/components/date-picker/index.js +1 -0
- package/dist/temp/src/components/empty-state/EmptyState.d.ts +3 -5
- package/dist/temp/src/components/empty-state/EmptyState.js +1 -2
- package/dist/temp/src/components/image-file-input/components/index.d.ts +1 -0
- package/dist/temp/src/components/image-file-input/components/index.js +1 -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/progress-bar/components/index.d.ts +2 -0
- package/dist/temp/src/components/progress-bar/components/index.js +2 -0
- package/dist/temp/src/components/progress-bar/hooks/index.d.ts +1 -0
- package/dist/temp/src/components/progress-bar/hooks/index.js +1 -0
- package/dist/temp/src/components/progress-bar/index.d.ts +3 -0
- package/dist/temp/src/components/progress-bar/index.js +3 -0
- package/dist/temp/src/components/select/Select.js +1 -1
- package/dist/temp/src/components/select-dropdown/index.d.ts +1 -1
- package/dist/temp/src/components/select-dropdown/index.js +1 -1
- package/dist/temp/src/components/spinner/Spinner.d.ts +1 -2
- package/dist/temp/src/components/switch/index.d.ts +1 -2
- package/dist/temp/src/components/switch/index.js +1 -1
- package/dist/temp/src/components/table/Table.d.ts +4 -2
- package/dist/temp/src/components/table/Table.js +95 -11
- package/dist/temp/src/components/table/types.d.ts +3 -1
- package/dist/temp/src/components/tag/Tag.d.ts +3 -5
- package/dist/temp/src/components/tag/Tag.js +1 -2
- package/dist/temp/src/components/tooltip/Tooltip.d.ts +4 -2
- package/dist/temp/src/components/tooltip/Tooltip.js +126 -68
- package/dist/temp/src/hooks/dropdown/index.d.ts +6 -6
- package/dist/temp/src/hooks/dropdown/index.js +6 -6
- package/dist/temp/src/hooks/index.d.ts +3 -3
- package/dist/temp/src/hooks/index.js +3 -3
- package/dist/temp/src/types/component-meta.d.ts +26 -0
- package/dist/temp/src/types/component-meta.js +2 -0
- package/dist/temp/src/types/dropdown/option.d.ts +2 -4
- package/dist/temp/src/types/side-slot.d.ts +9 -1
- package/dist/temp/vitest.config.d.ts +2 -0
- package/dist/temp/vitest.config.js +7 -0
- package/dist/types/src/components/badge/index.d.ts +1 -0
- package/dist/types/src/components/date-picker/index.d.ts +1 -0
- package/dist/types/src/components/empty-state/EmptyState.d.ts +3 -5
- package/dist/types/src/components/image-file-input/components/index.d.ts +1 -0
- package/dist/types/src/components/image-file-input/index.d.ts +1 -0
- package/dist/types/src/components/progress-bar/components/index.d.ts +2 -0
- package/dist/types/src/components/progress-bar/hooks/index.d.ts +1 -0
- package/dist/types/src/components/progress-bar/index.d.ts +3 -0
- package/dist/types/src/components/select-dropdown/index.d.ts +1 -1
- package/dist/types/src/components/spinner/Spinner.d.ts +1 -2
- package/dist/types/src/components/switch/index.d.ts +1 -2
- package/dist/types/src/components/table/Table.d.ts +4 -2
- package/dist/types/src/components/table/types.d.ts +3 -1
- package/dist/types/src/components/tag/Tag.d.ts +3 -5
- package/dist/types/src/components/tooltip/Tooltip.d.ts +4 -2
- package/dist/types/src/hooks/dropdown/index.d.ts +6 -6
- package/dist/types/src/hooks/index.d.ts +3 -3
- package/dist/types/src/types/component-meta.d.ts +26 -0
- package/dist/types/src/types/dropdown/option.d.ts +2 -4
- package/dist/types/src/types/side-slot.d.ts +9 -1
- package/dist/types/vitest.config.d.ts +2 -0
- package/dist/ui-admin/assets/styles/style.css +178 -60
- package/package.json +6 -1
- package/dist/cjs/assets/scripts/baseBox.js +0 -146
- package/dist/cjs/assets/scripts/comboBox.js +0 -137
- package/dist/cjs/assets/scripts/datePicker.js +0 -671
- package/dist/cjs/assets/scripts/featuredIcon.js +0 -87
- package/dist/cjs/assets/scripts/fileInput/const/classNames.js +0 -25
- package/dist/cjs/assets/scripts/fileInput/const/index.js +0 -27
- package/dist/cjs/assets/scripts/fileInput/const/types.js +0 -13
- package/dist/cjs/assets/scripts/fileInput/fileInput.js +0 -78
- package/dist/cjs/assets/scripts/fileInput/fileInputModel.js +0 -53
- package/dist/cjs/assets/scripts/fileInput/fileInputView.js +0 -152
- package/dist/cjs/assets/scripts/fileInput/index.js +0 -44
- package/dist/cjs/assets/scripts/imageFileInput/ImageFileInput.js +0 -184
- package/dist/cjs/assets/scripts/imageFileInput/ImageFileInputModel.js +0 -222
- package/dist/cjs/assets/scripts/imageFileInput/ImageFileInputView.js +0 -356
- package/dist/cjs/assets/scripts/imageFileInput/const/classNames.js +0 -31
- package/dist/cjs/assets/scripts/imageFileInput/const/index.js +0 -27
- package/dist/cjs/assets/scripts/imageFileInput/const/types.js +0 -13
- package/dist/cjs/assets/scripts/imageFileInput/index.js +0 -44
- package/dist/cjs/assets/scripts/index.js +0 -32
- package/dist/cjs/assets/scripts/modal/Modal.js +0 -104
- package/dist/cjs/assets/scripts/modal/ModalActions.js +0 -116
- package/dist/cjs/assets/scripts/modal/ModalContent.js +0 -46
- package/dist/cjs/assets/scripts/modal/ModalHeader.js +0 -104
- package/dist/cjs/assets/scripts/modal/const/classNames.js +0 -33
- package/dist/cjs/assets/scripts/modal/const/index.js +0 -27
- package/dist/cjs/assets/scripts/modal/index.js +0 -61
- package/dist/cjs/assets/scripts/modal/utils/contentUtils.js +0 -35
- package/dist/cjs/assets/scripts/notification/FloatingNotification.js +0 -178
- package/dist/cjs/assets/scripts/notification/FullWidthNotification.js +0 -132
- package/dist/cjs/assets/scripts/notification/MessageNotification.js +0 -159
- package/dist/cjs/assets/scripts/notification/Notification.js +0 -101
- package/dist/cjs/assets/scripts/notification/const/classNames.js +0 -50
- package/dist/cjs/assets/scripts/notification/const/icons.js +0 -31
- package/dist/cjs/assets/scripts/notification/const/index.js +0 -87
- package/dist/cjs/assets/scripts/notification/const/sizes.js +0 -46
- package/dist/cjs/assets/scripts/notification/const/types.js +0 -14
- package/dist/cjs/assets/scripts/notification/index.js +0 -92
- package/dist/cjs/assets/scripts/notification/utils.js +0 -97
- package/dist/cjs/assets/scripts/progress-bar/ProgressBar.js +0 -271
- package/dist/cjs/assets/scripts/progress-bar/index.js +0 -12
- package/dist/cjs/assets/scripts/selectBox.js +0 -169
- package/dist/cjs/assets/scripts/shared/ButtonCloseX.js +0 -45
- package/dist/cjs/assets/scripts/tab.js +0 -40
- package/dist/cjs/assets/scripts/table/Table.js +0 -377
- package/dist/cjs/assets/scripts/table/const/classNames.js +0 -33
- package/dist/cjs/assets/scripts/table/const/index.js +0 -27
- package/dist/cjs/assets/scripts/table/const/types.js +0 -5
- package/dist/cjs/assets/scripts/table/index.js +0 -43
- package/dist/cjs/assets/scripts/tag/Tag.js +0 -261
- package/dist/cjs/assets/scripts/tag/const/classNames.js +0 -20
- package/dist/cjs/assets/scripts/tag/const/index.js +0 -38
- package/dist/cjs/assets/scripts/tag/const/sizes.js +0 -13
- package/dist/cjs/assets/scripts/tag/const/types.js +0 -5
- package/dist/cjs/assets/scripts/tag/index.js +0 -44
- package/dist/cjs/assets/scripts/tooltip/Tooltip.js +0 -353
- package/dist/cjs/assets/scripts/tooltip/TooltipLayerManager.js +0 -82
- package/dist/cjs/assets/scripts/tooltip/const/classNames.js +0 -29
- package/dist/cjs/assets/scripts/tooltip/const/constants.js +0 -56
- package/dist/cjs/assets/scripts/tooltip/const/icons.js +0 -15
- package/dist/cjs/assets/scripts/tooltip/const/index.js +0 -123
- package/dist/cjs/assets/scripts/tooltip/const/templates.js +0 -66
- package/dist/cjs/assets/scripts/tooltip/const/types.js +0 -5
- package/dist/cjs/assets/scripts/tooltip/index.js +0 -57
- package/dist/cjs/assets/scripts/tooltip/utils.js +0 -40
- package/dist/cjs/assets/scripts/utils/debounce.js +0 -32
- package/dist/cjs/assets/scripts/utils/unifiedBox/domRenderer.js +0 -370
- package/dist/cjs/assets/scripts/utils/unifiedBox/dropdownModel.js +0 -285
- package/dist/cjs/assets/scripts/utils/unifiedBox/unifiedBoxController.js +0 -622
- package/dist/cjs/assets/scripts/utils/unifiedBox/unifiedBoxManager.js +0 -473
- package/dist/esm/assets/scripts/baseBox.js +0 -139
- package/dist/esm/assets/scripts/comboBox.js +0 -130
- package/dist/esm/assets/scripts/datePicker.js +0 -663
- package/dist/esm/assets/scripts/featuredIcon.js +0 -80
- package/dist/esm/assets/scripts/fileInput/const/classNames.js +0 -16
- package/dist/esm/assets/scripts/fileInput/const/index.js +0 -2
- package/dist/esm/assets/scripts/fileInput/const/types.js +0 -7
- package/dist/esm/assets/scripts/fileInput/fileInput.js +0 -71
- package/dist/esm/assets/scripts/fileInput/fileInputModel.js +0 -46
- package/dist/esm/assets/scripts/fileInput/fileInputView.js +0 -145
- package/dist/esm/assets/scripts/fileInput/index.js +0 -9
- package/dist/esm/assets/scripts/imageFileInput/ImageFileInput.js +0 -177
- package/dist/esm/assets/scripts/imageFileInput/ImageFileInputModel.js +0 -215
- package/dist/esm/assets/scripts/imageFileInput/ImageFileInputView.js +0 -349
- package/dist/esm/assets/scripts/imageFileInput/const/classNames.js +0 -20
- package/dist/esm/assets/scripts/imageFileInput/const/index.js +0 -2
- package/dist/esm/assets/scripts/imageFileInput/const/types.js +0 -7
- package/dist/esm/assets/scripts/imageFileInput/index.js +0 -9
- package/dist/esm/assets/scripts/index.js +0 -30
- package/dist/esm/assets/scripts/modal/Modal.js +0 -98
- package/dist/esm/assets/scripts/modal/ModalActions.js +0 -109
- package/dist/esm/assets/scripts/modal/ModalContent.js +0 -39
- package/dist/esm/assets/scripts/modal/ModalHeader.js +0 -97
- package/dist/esm/assets/scripts/modal/const/classNames.js +0 -23
- package/dist/esm/assets/scripts/modal/const/index.js +0 -2
- package/dist/esm/assets/scripts/modal/const/types.js +0 -1
- package/dist/esm/assets/scripts/modal/index.js +0 -15
- package/dist/esm/assets/scripts/modal/utils/contentUtils.js +0 -28
- package/dist/esm/assets/scripts/notification/FloatingNotification.js +0 -172
- package/dist/esm/assets/scripts/notification/FullWidthNotification.js +0 -125
- package/dist/esm/assets/scripts/notification/MessageNotification.js +0 -152
- package/dist/esm/assets/scripts/notification/Notification.js +0 -94
- package/dist/esm/assets/scripts/notification/const/classNames.js +0 -44
- package/dist/esm/assets/scripts/notification/const/icons.js +0 -25
- package/dist/esm/assets/scripts/notification/const/index.js +0 -4
- package/dist/esm/assets/scripts/notification/const/sizes.js +0 -40
- package/dist/esm/assets/scripts/notification/const/types.js +0 -8
- package/dist/esm/assets/scripts/notification/index.js +0 -11
- package/dist/esm/assets/scripts/notification/utils.js +0 -84
- package/dist/esm/assets/scripts/progress-bar/ProgressBar.js +0 -264
- package/dist/esm/assets/scripts/progress-bar/index.js +0 -1
- package/dist/esm/assets/scripts/selectBox.js +0 -162
- package/dist/esm/assets/scripts/shared/ButtonCloseX.js +0 -37
- package/dist/esm/assets/scripts/tab.js +0 -33
- package/dist/esm/assets/scripts/table/Table.js +0 -370
- package/dist/esm/assets/scripts/table/const/classNames.js +0 -27
- package/dist/esm/assets/scripts/table/const/index.js +0 -2
- package/dist/esm/assets/scripts/table/const/types.js +0 -1
- package/dist/esm/assets/scripts/table/index.js +0 -8
- package/dist/esm/assets/scripts/tag/Tag.js +0 -254
- package/dist/esm/assets/scripts/tag/const/classNames.js +0 -12
- package/dist/esm/assets/scripts/tag/const/index.js +0 -3
- package/dist/esm/assets/scripts/tag/const/sizes.js +0 -7
- package/dist/esm/assets/scripts/tag/const/types.js +0 -1
- package/dist/esm/assets/scripts/tag/index.js +0 -9
- package/dist/esm/assets/scripts/tooltip/Tooltip.js +0 -346
- package/dist/esm/assets/scripts/tooltip/TooltipLayerManager.js +0 -75
- package/dist/esm/assets/scripts/tooltip/const/classNames.js +0 -23
- package/dist/esm/assets/scripts/tooltip/const/constants.js +0 -50
- package/dist/esm/assets/scripts/tooltip/const/icons.js +0 -9
- package/dist/esm/assets/scripts/tooltip/const/index.js +0 -4
- package/dist/esm/assets/scripts/tooltip/const/templates.js +0 -59
- package/dist/esm/assets/scripts/tooltip/const/types.js +0 -1
- package/dist/esm/assets/scripts/tooltip/index.js +0 -10
- package/dist/esm/assets/scripts/tooltip/utils.js +0 -34
- package/dist/esm/assets/scripts/utils/debounce.js +0 -26
- package/dist/esm/assets/scripts/utils/unifiedBox/domRenderer.js +0 -363
- package/dist/esm/assets/scripts/utils/unifiedBox/dropdownModel.js +0 -279
- package/dist/esm/assets/scripts/utils/unifiedBox/unifiedBoxController.js +0 -615
- package/dist/esm/assets/scripts/utils/unifiedBox/unifiedBoxManager.js +0 -466
- package/dist/temp/assets/scripts/baseBox.d.ts +0 -55
- package/dist/temp/assets/scripts/baseBox.js +0 -140
- package/dist/temp/assets/scripts/comboBox.d.ts +0 -60
- package/dist/temp/assets/scripts/comboBox.js +0 -132
- package/dist/temp/assets/scripts/datePicker.d.ts +0 -86
- package/dist/temp/assets/scripts/datePicker.js +0 -699
- package/dist/temp/assets/scripts/featuredIcon.d.ts +0 -22
- package/dist/temp/assets/scripts/featuredIcon.js +0 -79
- package/dist/temp/assets/scripts/fileInput/const/classNames.d.ts +0 -15
- package/dist/temp/assets/scripts/fileInput/const/classNames.js +0 -16
- package/dist/temp/assets/scripts/fileInput/const/index.d.ts +0 -2
- package/dist/temp/assets/scripts/fileInput/const/index.js +0 -2
- package/dist/temp/assets/scripts/fileInput/const/types.d.ts +0 -88
- package/dist/temp/assets/scripts/fileInput/const/types.js +0 -7
- package/dist/temp/assets/scripts/fileInput/fileInput.d.ts +0 -13
- package/dist/temp/assets/scripts/fileInput/fileInput.js +0 -71
- package/dist/temp/assets/scripts/fileInput/fileInputModel.d.ts +0 -12
- package/dist/temp/assets/scripts/fileInput/fileInputModel.js +0 -37
- package/dist/temp/assets/scripts/fileInput/fileInputView.d.ts +0 -42
- package/dist/temp/assets/scripts/fileInput/fileInputView.js +0 -145
- package/dist/temp/assets/scripts/fileInput/index.d.ts +0 -3
- package/dist/temp/assets/scripts/fileInput/index.js +0 -9
- package/dist/temp/assets/scripts/imageFileInput/ImageFileInput.d.ts +0 -63
- package/dist/temp/assets/scripts/imageFileInput/ImageFileInput.js +0 -180
- package/dist/temp/assets/scripts/imageFileInput/ImageFileInputModel.d.ts +0 -73
- package/dist/temp/assets/scripts/imageFileInput/ImageFileInputModel.js +0 -214
- package/dist/temp/assets/scripts/imageFileInput/ImageFileInputView.d.ts +0 -79
- package/dist/temp/assets/scripts/imageFileInput/ImageFileInputView.js +0 -350
- package/dist/temp/assets/scripts/imageFileInput/const/classNames.d.ts +0 -19
- package/dist/temp/assets/scripts/imageFileInput/const/classNames.js +0 -20
- package/dist/temp/assets/scripts/imageFileInput/const/index.d.ts +0 -2
- package/dist/temp/assets/scripts/imageFileInput/const/index.js +0 -2
- package/dist/temp/assets/scripts/imageFileInput/const/types.d.ts +0 -125
- package/dist/temp/assets/scripts/imageFileInput/const/types.js +0 -7
- package/dist/temp/assets/scripts/imageFileInput/index.d.ts +0 -3
- package/dist/temp/assets/scripts/imageFileInput/index.js +0 -9
- package/dist/temp/assets/scripts/index.d.ts +0 -34
- package/dist/temp/assets/scripts/index.js +0 -30
- package/dist/temp/assets/scripts/modal/Modal.d.ts +0 -27
- package/dist/temp/assets/scripts/modal/Modal.js +0 -100
- package/dist/temp/assets/scripts/modal/ModalActions.d.ts +0 -18
- package/dist/temp/assets/scripts/modal/ModalActions.js +0 -117
- package/dist/temp/assets/scripts/modal/ModalContent.d.ts +0 -13
- package/dist/temp/assets/scripts/modal/ModalContent.js +0 -39
- package/dist/temp/assets/scripts/modal/ModalHeader.d.ts +0 -15
- package/dist/temp/assets/scripts/modal/ModalHeader.js +0 -96
- package/dist/temp/assets/scripts/modal/const/classNames.d.ts +0 -22
- package/dist/temp/assets/scripts/modal/const/classNames.js +0 -23
- package/dist/temp/assets/scripts/modal/const/index.d.ts +0 -2
- package/dist/temp/assets/scripts/modal/const/index.js +0 -2
- package/dist/temp/assets/scripts/modal/const/types.d.ts +0 -61
- package/dist/temp/assets/scripts/modal/const/types.js +0 -1
- package/dist/temp/assets/scripts/modal/index.d.ts +0 -7
- package/dist/temp/assets/scripts/modal/index.js +0 -15
- package/dist/temp/assets/scripts/modal/utils/contentUtils.d.ts +0 -10
- package/dist/temp/assets/scripts/modal/utils/contentUtils.js +0 -29
- package/dist/temp/assets/scripts/notification/FloatingNotification.d.ts +0 -24
- package/dist/temp/assets/scripts/notification/FloatingNotification.js +0 -157
- package/dist/temp/assets/scripts/notification/FullWidthNotification.d.ts +0 -21
- package/dist/temp/assets/scripts/notification/FullWidthNotification.js +0 -110
- package/dist/temp/assets/scripts/notification/MessageNotification.d.ts +0 -22
- package/dist/temp/assets/scripts/notification/MessageNotification.js +0 -140
- package/dist/temp/assets/scripts/notification/Notification.d.ts +0 -21
- package/dist/temp/assets/scripts/notification/Notification.js +0 -94
- package/dist/temp/assets/scripts/notification/const/classNames.d.ts +0 -43
- package/dist/temp/assets/scripts/notification/const/classNames.js +0 -44
- package/dist/temp/assets/scripts/notification/const/icons.d.ts +0 -25
- package/dist/temp/assets/scripts/notification/const/icons.js +0 -25
- package/dist/temp/assets/scripts/notification/const/index.d.ts +0 -5
- package/dist/temp/assets/scripts/notification/const/index.js +0 -4
- package/dist/temp/assets/scripts/notification/const/sizes.d.ts +0 -32
- package/dist/temp/assets/scripts/notification/const/sizes.js +0 -40
- package/dist/temp/assets/scripts/notification/const/types.d.ts +0 -19
- package/dist/temp/assets/scripts/notification/const/types.js +0 -8
- package/dist/temp/assets/scripts/notification/index.d.ts +0 -7
- package/dist/temp/assets/scripts/notification/index.js +0 -11
- package/dist/temp/assets/scripts/notification/utils.d.ts +0 -8
- package/dist/temp/assets/scripts/notification/utils.js +0 -89
- package/dist/temp/assets/scripts/progress-bar/ProgressBar.d.ts +0 -67
- package/dist/temp/assets/scripts/progress-bar/ProgressBar.js +0 -263
- package/dist/temp/assets/scripts/progress-bar/index.d.ts +0 -1
- package/dist/temp/assets/scripts/progress-bar/index.js +0 -1
- package/dist/temp/assets/scripts/selectBox.d.ts +0 -50
- package/dist/temp/assets/scripts/selectBox.js +0 -170
- package/dist/temp/assets/scripts/shared/ButtonCloseX.d.ts +0 -5
- package/dist/temp/assets/scripts/shared/ButtonCloseX.js +0 -33
- package/dist/temp/assets/scripts/tab.d.ts +0 -7
- package/dist/temp/assets/scripts/tab.js +0 -33
- package/dist/temp/assets/scripts/table/Table.d.ts +0 -41
- package/dist/temp/assets/scripts/table/Table.js +0 -378
- package/dist/temp/assets/scripts/table/const/classNames.d.ts +0 -27
- package/dist/temp/assets/scripts/table/const/classNames.js +0 -27
- package/dist/temp/assets/scripts/table/const/index.d.ts +0 -2
- package/dist/temp/assets/scripts/table/const/index.js +0 -2
- package/dist/temp/assets/scripts/table/const/types.d.ts +0 -23
- package/dist/temp/assets/scripts/table/const/types.js +0 -1
- package/dist/temp/assets/scripts/table/index.d.ts +0 -3
- package/dist/temp/assets/scripts/table/index.js +0 -8
- package/dist/temp/assets/scripts/tag/Tag.d.ts +0 -27
- package/dist/temp/assets/scripts/tag/Tag.js +0 -259
- package/dist/temp/assets/scripts/tag/const/classNames.d.ts +0 -11
- package/dist/temp/assets/scripts/tag/const/classNames.js +0 -12
- package/dist/temp/assets/scripts/tag/const/index.d.ts +0 -3
- package/dist/temp/assets/scripts/tag/const/index.js +0 -3
- package/dist/temp/assets/scripts/tag/const/sizes.d.ts +0 -7
- package/dist/temp/assets/scripts/tag/const/sizes.js +0 -7
- package/dist/temp/assets/scripts/tag/const/types.d.ts +0 -33
- package/dist/temp/assets/scripts/tag/const/types.js +0 -1
- package/dist/temp/assets/scripts/tag/index.d.ts +0 -3
- package/dist/temp/assets/scripts/tag/index.js +0 -9
- package/dist/temp/assets/scripts/tooltip/Tooltip.d.ts +0 -54
- package/dist/temp/assets/scripts/tooltip/Tooltip.js +0 -335
- package/dist/temp/assets/scripts/tooltip/TooltipLayerManager.d.ts +0 -21
- package/dist/temp/assets/scripts/tooltip/TooltipLayerManager.js +0 -71
- package/dist/temp/assets/scripts/tooltip/const/classNames.d.ts +0 -17
- package/dist/temp/assets/scripts/tooltip/const/classNames.js +0 -23
- package/dist/temp/assets/scripts/tooltip/const/constants.d.ts +0 -33
- package/dist/temp/assets/scripts/tooltip/const/constants.js +0 -46
- package/dist/temp/assets/scripts/tooltip/const/icons.d.ts +0 -4
- package/dist/temp/assets/scripts/tooltip/const/icons.js +0 -9
- package/dist/temp/assets/scripts/tooltip/const/index.d.ts +0 -5
- package/dist/temp/assets/scripts/tooltip/const/index.js +0 -4
- package/dist/temp/assets/scripts/tooltip/const/templates.d.ts +0 -16
- package/dist/temp/assets/scripts/tooltip/const/templates.js +0 -59
- package/dist/temp/assets/scripts/tooltip/const/types.d.ts +0 -14
- package/dist/temp/assets/scripts/tooltip/const/types.js +0 -1
- package/dist/temp/assets/scripts/tooltip/index.d.ts +0 -6
- package/dist/temp/assets/scripts/tooltip/index.js +0 -10
- package/dist/temp/assets/scripts/tooltip/utils.d.ts +0 -2
- package/dist/temp/assets/scripts/tooltip/utils.js +0 -33
- package/dist/temp/assets/scripts/utils/debounce.d.ts +0 -8
- package/dist/temp/assets/scripts/utils/debounce.js +0 -23
- package/dist/temp/assets/scripts/utils/unifiedBox/domRenderer.d.ts +0 -107
- package/dist/temp/assets/scripts/utils/unifiedBox/domRenderer.js +0 -367
- package/dist/temp/assets/scripts/utils/unifiedBox/dropdownModel.d.ts +0 -142
- package/dist/temp/assets/scripts/utils/unifiedBox/dropdownModel.js +0 -286
- package/dist/temp/assets/scripts/utils/unifiedBox/unifiedBoxController.d.ts +0 -156
- package/dist/temp/assets/scripts/utils/unifiedBox/unifiedBoxController.js +0 -604
- package/dist/temp/assets/scripts/utils/unifiedBox/unifiedBoxManager.d.ts +0 -95
- package/dist/temp/assets/scripts/utils/unifiedBox/unifiedBoxManager.js +0 -482
- package/dist/types/assets/scripts/baseBox.d.ts +0 -55
- package/dist/types/assets/scripts/comboBox.d.ts +0 -60
- package/dist/types/assets/scripts/datePicker.d.ts +0 -86
- package/dist/types/assets/scripts/featuredIcon.d.ts +0 -22
- package/dist/types/assets/scripts/fileInput/const/classNames.d.ts +0 -15
- package/dist/types/assets/scripts/fileInput/const/index.d.ts +0 -2
- package/dist/types/assets/scripts/fileInput/const/types.d.ts +0 -88
- package/dist/types/assets/scripts/fileInput/fileInput.d.ts +0 -13
- package/dist/types/assets/scripts/fileInput/fileInputModel.d.ts +0 -12
- package/dist/types/assets/scripts/fileInput/fileInputView.d.ts +0 -42
- package/dist/types/assets/scripts/fileInput/index.d.ts +0 -3
- package/dist/types/assets/scripts/imageFileInput/ImageFileInput.d.ts +0 -63
- package/dist/types/assets/scripts/imageFileInput/ImageFileInputModel.d.ts +0 -73
- package/dist/types/assets/scripts/imageFileInput/ImageFileInputView.d.ts +0 -79
- package/dist/types/assets/scripts/imageFileInput/const/classNames.d.ts +0 -19
- package/dist/types/assets/scripts/imageFileInput/const/index.d.ts +0 -2
- package/dist/types/assets/scripts/imageFileInput/const/types.d.ts +0 -125
- package/dist/types/assets/scripts/imageFileInput/index.d.ts +0 -3
- package/dist/types/assets/scripts/index.d.ts +0 -34
- package/dist/types/assets/scripts/modal/Modal.d.ts +0 -27
- package/dist/types/assets/scripts/modal/ModalActions.d.ts +0 -18
- package/dist/types/assets/scripts/modal/ModalContent.d.ts +0 -13
- package/dist/types/assets/scripts/modal/ModalHeader.d.ts +0 -15
- package/dist/types/assets/scripts/modal/const/classNames.d.ts +0 -22
- package/dist/types/assets/scripts/modal/const/index.d.ts +0 -2
- package/dist/types/assets/scripts/modal/const/types.d.ts +0 -61
- package/dist/types/assets/scripts/modal/index.d.ts +0 -7
- package/dist/types/assets/scripts/modal/utils/contentUtils.d.ts +0 -10
- package/dist/types/assets/scripts/notification/FloatingNotification.d.ts +0 -24
- package/dist/types/assets/scripts/notification/FullWidthNotification.d.ts +0 -21
- package/dist/types/assets/scripts/notification/MessageNotification.d.ts +0 -22
- package/dist/types/assets/scripts/notification/Notification.d.ts +0 -21
- package/dist/types/assets/scripts/notification/const/classNames.d.ts +0 -43
- package/dist/types/assets/scripts/notification/const/icons.d.ts +0 -25
- package/dist/types/assets/scripts/notification/const/index.d.ts +0 -5
- package/dist/types/assets/scripts/notification/const/sizes.d.ts +0 -32
- package/dist/types/assets/scripts/notification/const/types.d.ts +0 -19
- package/dist/types/assets/scripts/notification/index.d.ts +0 -7
- package/dist/types/assets/scripts/notification/utils.d.ts +0 -8
- package/dist/types/assets/scripts/progress-bar/ProgressBar.d.ts +0 -67
- package/dist/types/assets/scripts/progress-bar/index.d.ts +0 -1
- package/dist/types/assets/scripts/selectBox.d.ts +0 -50
- package/dist/types/assets/scripts/shared/ButtonCloseX.d.ts +0 -5
- package/dist/types/assets/scripts/tab.d.ts +0 -7
- package/dist/types/assets/scripts/table/Table.d.ts +0 -41
- package/dist/types/assets/scripts/table/const/classNames.d.ts +0 -27
- package/dist/types/assets/scripts/table/const/index.d.ts +0 -2
- package/dist/types/assets/scripts/table/const/types.d.ts +0 -23
- package/dist/types/assets/scripts/table/index.d.ts +0 -3
- package/dist/types/assets/scripts/tag/Tag.d.ts +0 -27
- package/dist/types/assets/scripts/tag/const/classNames.d.ts +0 -11
- package/dist/types/assets/scripts/tag/const/index.d.ts +0 -3
- package/dist/types/assets/scripts/tag/const/sizes.d.ts +0 -7
- package/dist/types/assets/scripts/tag/const/types.d.ts +0 -33
- package/dist/types/assets/scripts/tag/index.d.ts +0 -3
- package/dist/types/assets/scripts/tooltip/Tooltip.d.ts +0 -54
- package/dist/types/assets/scripts/tooltip/TooltipLayerManager.d.ts +0 -21
- package/dist/types/assets/scripts/tooltip/const/classNames.d.ts +0 -17
- package/dist/types/assets/scripts/tooltip/const/constants.d.ts +0 -33
- package/dist/types/assets/scripts/tooltip/const/icons.d.ts +0 -4
- package/dist/types/assets/scripts/tooltip/const/index.d.ts +0 -5
- package/dist/types/assets/scripts/tooltip/const/templates.d.ts +0 -16
- package/dist/types/assets/scripts/tooltip/const/types.d.ts +0 -14
- package/dist/types/assets/scripts/tooltip/index.d.ts +0 -6
- package/dist/types/assets/scripts/tooltip/utils.d.ts +0 -2
- package/dist/types/assets/scripts/utils/debounce.d.ts +0 -8
- package/dist/types/assets/scripts/utils/unifiedBox/domRenderer.d.ts +0 -107
- package/dist/types/assets/scripts/utils/unifiedBox/dropdownModel.d.ts +0 -142
- package/dist/types/assets/scripts/utils/unifiedBox/unifiedBoxController.d.ts +0 -156
- package/dist/types/assets/scripts/utils/unifiedBox/unifiedBoxManager.d.ts +0 -95
- /package/dist/cjs/{assets/scripts/modal/const/types.js → src/types/component-meta.js} +0 -0
|
@@ -6,5 +6,5 @@ export const Select = forwardRef(({ placeholder, disabledPlaceholder = false, id
|
|
|
6
6
|
return (_jsxs("span", { className: classNames('ncua-select', {
|
|
7
7
|
destructive: destructive,
|
|
8
8
|
'ncua-select--simple': type === 'simple',
|
|
9
|
-
}, className, `ncua-select--${size}`), children: [_jsx("span", { className: "ncua-select__content", children: _jsxs("select", { value: value, ref: ref, id: id, className: classNames('ncua-select__tag', className), disabled: disabled, ...register, ...props, children: [placeholder && (_jsx("option", { value: "",
|
|
9
|
+
}, className, `ncua-select--${size}`), children: [_jsx("span", { className: "ncua-select__content", children: _jsxs("select", { value: value, ref: ref, id: id, className: classNames('ncua-select__tag', className), disabled: disabled, ...register, ...props, children: [placeholder && (_jsx("option", { value: "", disabled: disabledPlaceholder, children: placeholder })), optionItems?.map((item) => (_jsx("option", { value: item.id, children: item.label }, item.id))), children] }) }), hintText && (_jsx(HintText, { destructive: destructive, className: "ncua-hint-text", children: hintText }))] }));
|
|
10
10
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './SelectDropdown';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './SelectDropdown';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { ElementType, ReactNode } from 'react';
|
|
2
|
-
interface SpinnerProps {
|
|
2
|
+
export interface SpinnerProps {
|
|
3
3
|
as?: ElementType;
|
|
4
4
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
backdrop?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare const Spinner: ({ as, size, children, backdrop }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { Switch } from './Switch';
|
|
1
|
+
export * from './Switch';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './Switch';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import type { SortDirection, TableBodyProps,
|
|
2
|
+
import type { SortDirection, TableBodyProps, TableColGroupProps, TableEmptyProps, TableFooterProps, TableHeaderProps, TablePaginationProps } from './types';
|
|
3
3
|
export declare const Table: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
4
|
type?: import("./types").TableType | undefined;
|
|
5
5
|
fixedHeader?: boolean | undefined;
|
|
@@ -25,7 +25,9 @@ export declare const Table: import("react").ForwardRefExoticComponent<Omit<impor
|
|
|
25
25
|
onSort?: (() => void) | undefined;
|
|
26
26
|
width?: string | number | undefined;
|
|
27
27
|
} & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
28
|
-
Cell: import("react").ForwardRefExoticComponent<
|
|
28
|
+
Cell: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref"> & {
|
|
29
|
+
isHeader?: boolean | undefined;
|
|
30
|
+
} & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
29
31
|
Footer: {
|
|
30
32
|
({ children, className }: TableFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
31
33
|
displayName: string;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ChevronDown, ChevronSelectorVertical, ChevronUp } from '@ncds/ui-admin-icon';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import { Children, forwardRef } from 'react';
|
|
4
|
+
import { Children, forwardRef, useEffect, useRef, } from 'react';
|
|
5
5
|
// ──────────────────────────────────────────────
|
|
6
|
+
// $table-header-height 와 동기화 — sticky thead가 차지하는 높이를 maxHeight에 보상
|
|
7
|
+
const TABLE_HEADER_HEIGHT = 40;
|
|
8
|
+
// 스크롤바 트랙 상하 여백 합계 (top 8px + bottom 8px) — SCSS &--fixed-header &__scrollbar 오프셋과 동기화
|
|
9
|
+
const SCROLLBAR_TRACK_OFFSET = 16;
|
|
10
|
+
const SCROLLBAR_THUMB_MIN_HEIGHT = 40;
|
|
6
11
|
// Sort Icons (@ncds/ui-admin-icon)
|
|
7
12
|
// ──────────────────────────────────────────────
|
|
8
13
|
const SORT_ICONS = {
|
|
@@ -36,7 +41,12 @@ const HeaderCell = forwardRef(({ children, className, sortDirection, onSort, wid
|
|
|
36
41
|
}), style: { ...style, width }, "aria-sort": isSortable ? ARIA_SORT_MAP[sortDirection] : undefined, onClick: isSortable ? onSort : undefined, ...rest, children: isSortable && SortIcon ? (_jsxs("span", { className: "ncua-table__header-cell-inner", children: [_jsx("span", { className: "ncua-table__header-cell-text", children: children }), _jsx("span", { className: "ncua-table__sort-icon", children: _jsx(SortIcon, { width: 16, height: 16 }) })] })) : (children) }));
|
|
37
42
|
});
|
|
38
43
|
HeaderCell.displayName = 'Table.HeaderCell';
|
|
39
|
-
const Cell = forwardRef(({ children, className, ...rest }, ref) =>
|
|
44
|
+
const Cell = forwardRef(({ children, className, isHeader, ...rest }, ref) => {
|
|
45
|
+
if (isHeader) {
|
|
46
|
+
return (_jsx("th", { ref: ref, scope: "row", className: classNames('ncua-table__cell', className), ...rest, children: children }));
|
|
47
|
+
}
|
|
48
|
+
return (_jsx("td", { ref: ref, className: classNames('ncua-table__cell', className), ...rest, children: children }));
|
|
49
|
+
});
|
|
40
50
|
Cell.displayName = 'Table.Cell';
|
|
41
51
|
const Footer = ({ children, className }) => (_jsx("div", { className: classNames('ncua-table__footer', className), children: children }));
|
|
42
52
|
Footer.displayName = 'Table.Footer';
|
|
@@ -50,10 +60,9 @@ const ColGroup = ({ widths }) => {
|
|
|
50
60
|
return `${width}px`;
|
|
51
61
|
return width;
|
|
52
62
|
};
|
|
53
|
-
return (_jsx("colgroup", { children: widths.map((width, index) =>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}) }));
|
|
63
|
+
return (_jsx("colgroup", { children: widths.map((width, index) => (
|
|
64
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: colgroup columns never reorder or change
|
|
65
|
+
_jsx("col", { style: { width: resolveColWidth(width) } }, index))) }));
|
|
57
66
|
};
|
|
58
67
|
ColGroup.displayName = 'Table.ColGroup';
|
|
59
68
|
const Empty = ({ colSpan, children }) => (_jsx("tr", { children: _jsx("td", { colSpan: colSpan, className: "ncua-table__empty", role: "status", "aria-live": "polite", children: children || '등록된 게시물이 없습니다.' }) }));
|
|
@@ -69,12 +78,24 @@ const categorizeChild = (child, result) => {
|
|
|
69
78
|
else if (child.type === Pagination) {
|
|
70
79
|
result.paginationContent.push(child);
|
|
71
80
|
}
|
|
81
|
+
else if (child.type === Header) {
|
|
82
|
+
result.headerContent.push(child);
|
|
83
|
+
}
|
|
84
|
+
else if (child.type === ColGroup) {
|
|
85
|
+
result.colGroupContent.push(child);
|
|
86
|
+
}
|
|
72
87
|
else {
|
|
73
88
|
result.tableContent.push(child);
|
|
74
89
|
}
|
|
75
90
|
};
|
|
76
91
|
const sortChildren = (children) => {
|
|
77
|
-
const result = {
|
|
92
|
+
const result = {
|
|
93
|
+
headerContent: [],
|
|
94
|
+
colGroupContent: [],
|
|
95
|
+
tableContent: [],
|
|
96
|
+
footerContent: [],
|
|
97
|
+
paginationContent: [],
|
|
98
|
+
};
|
|
78
99
|
Children.forEach(children, (child) => {
|
|
79
100
|
categorizeChild(child, result);
|
|
80
101
|
});
|
|
@@ -91,12 +112,75 @@ const TableComponent = forwardRef(({ type = 'horizontal', fixedHeader = false, m
|
|
|
91
112
|
'ncua-table--hoverable': hoverable && type === 'horizontal',
|
|
92
113
|
'ncua-table--selectable': selectable,
|
|
93
114
|
});
|
|
94
|
-
const { tableContent, footerContent, paginationContent } = sortChildren(children);
|
|
115
|
+
const { headerContent, colGroupContent, tableContent, footerContent, paginationContent } = sortChildren(children);
|
|
95
116
|
const scrollStyle = fixedHeader && maxHeight
|
|
96
|
-
? {
|
|
117
|
+
? {
|
|
118
|
+
maxHeight: typeof maxHeight === 'number'
|
|
119
|
+
? `${maxHeight + TABLE_HEADER_HEIGHT}px`
|
|
120
|
+
: `calc(${maxHeight} + ${TABLE_HEADER_HEIGHT}px)`,
|
|
121
|
+
}
|
|
97
122
|
: undefined;
|
|
98
|
-
|
|
99
|
-
|
|
123
|
+
// Custom scrollbar refs (used only in fixed-header mode)
|
|
124
|
+
const scrollContainerRef = useRef(null);
|
|
125
|
+
const scrollAreaRef = useRef(null);
|
|
126
|
+
const thumbRef = useRef(null);
|
|
127
|
+
useEffect(() => {
|
|
128
|
+
if (!fixedHeader || !maxHeight)
|
|
129
|
+
return;
|
|
130
|
+
const scrollEl = scrollContainerRef.current;
|
|
131
|
+
const thumbEl = thumbRef.current;
|
|
132
|
+
if (!scrollEl || !thumbEl)
|
|
133
|
+
return;
|
|
134
|
+
const update = () => {
|
|
135
|
+
const { scrollTop, scrollHeight, clientHeight } = scrollEl;
|
|
136
|
+
if (scrollHeight <= clientHeight) {
|
|
137
|
+
thumbEl.style.height = '0';
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
const trackHeight = (scrollAreaRef.current?.clientHeight ?? clientHeight) - TABLE_HEADER_HEIGHT - SCROLLBAR_TRACK_OFFSET;
|
|
141
|
+
const thumbHeight = Math.max(SCROLLBAR_THUMB_MIN_HEIGHT, (clientHeight / scrollHeight) * trackHeight);
|
|
142
|
+
const thumbTop = (scrollTop / (scrollHeight - clientHeight)) * (trackHeight - thumbHeight);
|
|
143
|
+
thumbEl.style.height = `${thumbHeight}px`;
|
|
144
|
+
thumbEl.style.transform = `translateY(${thumbTop}px)`;
|
|
145
|
+
};
|
|
146
|
+
scrollEl.addEventListener('scroll', update, { passive: true });
|
|
147
|
+
const observer = new ResizeObserver(update);
|
|
148
|
+
observer.observe(scrollEl);
|
|
149
|
+
update();
|
|
150
|
+
return () => {
|
|
151
|
+
scrollEl.removeEventListener('scroll', update);
|
|
152
|
+
observer.disconnect();
|
|
153
|
+
};
|
|
154
|
+
}, [fixedHeader, maxHeight]);
|
|
155
|
+
const handleThumbMouseDown = (e) => {
|
|
156
|
+
e.preventDefault();
|
|
157
|
+
const scrollEl = scrollContainerRef.current;
|
|
158
|
+
const thumbEl = thumbRef.current;
|
|
159
|
+
const areaEl = scrollAreaRef.current;
|
|
160
|
+
if (!scrollEl || !thumbEl)
|
|
161
|
+
return;
|
|
162
|
+
areaEl?.setAttribute('data-dragging', '');
|
|
163
|
+
const startY = e.clientY;
|
|
164
|
+
const startScrollTop = scrollEl.scrollTop;
|
|
165
|
+
const { scrollHeight, clientHeight } = scrollEl;
|
|
166
|
+
const thumbHeight = thumbEl.offsetHeight;
|
|
167
|
+
const scrollRatio = (scrollHeight - clientHeight) / (clientHeight - thumbHeight);
|
|
168
|
+
const onMove = (ev) => {
|
|
169
|
+
scrollEl.scrollTop = startScrollTop + (ev.clientY - startY) * scrollRatio;
|
|
170
|
+
};
|
|
171
|
+
const onUp = () => {
|
|
172
|
+
areaEl?.removeAttribute('data-dragging');
|
|
173
|
+
document.removeEventListener('mousemove', onMove);
|
|
174
|
+
document.removeEventListener('mouseup', onUp);
|
|
175
|
+
};
|
|
176
|
+
document.addEventListener('mousemove', onMove);
|
|
177
|
+
document.addEventListener('mouseup', onUp);
|
|
178
|
+
};
|
|
179
|
+
if (fixedHeader && maxHeight) {
|
|
180
|
+
return (_jsxs("div", { ref: ref, className: "ncua-table-wrapper", children: [_jsxs("div", { className: tableClasses, ...rest, children: [_jsxs("div", { ref: scrollAreaRef, className: "ncua-table__scroll-area", children: [_jsx("div", { ref: scrollContainerRef, className: "ncua-table__scroll-container", style: scrollStyle, children: _jsxs("table", { className: "ncua-table__table", role: "table", children: [colGroupContent, headerContent, tableContent] }) }), _jsx("div", { className: "ncua-table__scrollbar", "aria-hidden": "true", children: _jsx("div", { ref: thumbRef, className: "ncua-table__scrollbar-thumb", onMouseDown: handleThumbMouseDown }) })] }), footerContent] }), paginationContent] }));
|
|
181
|
+
}
|
|
182
|
+
const tableElement = (_jsxs("table", { className: "ncua-table__table", role: "table", children: [colGroupContent, headerContent, tableContent] }));
|
|
183
|
+
return (_jsxs("div", { ref: ref, className: "ncua-table-wrapper", children: [_jsxs("div", { className: tableClasses, ...rest, children: [tableElement, footerContent] }), paginationContent] }));
|
|
100
184
|
});
|
|
101
185
|
TableComponent.displayName = 'Table';
|
|
102
186
|
// ──────────────────────────────────────────────
|
|
@@ -27,7 +27,9 @@ export type TableHeaderCellProps = Omit<ComponentProps<'th'>, 'ref'> & {
|
|
|
27
27
|
onSort?: () => void;
|
|
28
28
|
width?: string | number;
|
|
29
29
|
};
|
|
30
|
-
export type TableCellProps = Omit<ComponentProps<'td'>, 'ref'
|
|
30
|
+
export type TableCellProps = Omit<ComponentProps<'td'>, 'ref'> & {
|
|
31
|
+
isHeader?: boolean;
|
|
32
|
+
};
|
|
31
33
|
export type TableFooterProps = {
|
|
32
34
|
children: ReactNode;
|
|
33
35
|
className?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type MouseEventHandler } from 'react';
|
|
2
2
|
import type { Size } from '../../../constant/size';
|
|
3
3
|
import type { SideSlotType } from '../../types/side-slot';
|
|
4
|
-
interface TagProps {
|
|
4
|
+
export interface TagProps {
|
|
5
5
|
size?: Extract<Size, 'sm' | 'md'>;
|
|
6
6
|
icon?: SideSlotType;
|
|
7
7
|
text: string;
|
|
@@ -11,7 +11,5 @@ interface TagProps {
|
|
|
11
11
|
onButtonClick?: MouseEventHandler<HTMLButtonElement>;
|
|
12
12
|
maxLength?: number;
|
|
13
13
|
}
|
|
14
|
-
type CalculatedPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
15
|
-
declare const Tag: ({ size, icon, text, count, close, onButtonClick, maxLength }: TagProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export type { CalculatedPosition };
|
|
17
|
-
export { Tag };
|
|
14
|
+
export type CalculatedPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
15
|
+
export declare const Tag: ({ size, icon, text, count, close, onButtonClick, maxLength }: TagProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -41,7 +41,7 @@ const calculateOptimalPosition = (triggerElement, tooltipElement) => {
|
|
|
41
41
|
const fallbackPosition = hasTopSpace ? 'top-right' : 'bottom-right';
|
|
42
42
|
return fallbackPosition;
|
|
43
43
|
};
|
|
44
|
-
const Tag = ({ size = 'sm', icon, text, count, close, onButtonClick, maxLength = 20 }) => {
|
|
44
|
+
export const Tag = ({ size = 'sm', icon, text, count, close, onButtonClick, maxLength = 20 }) => {
|
|
45
45
|
const [isTooltipVisible, setIsTooltipVisible] = useState(false);
|
|
46
46
|
const [calculatedPosition, setCalculatedPosition] = useState('top-right');
|
|
47
47
|
const tagRef = useRef(null);
|
|
@@ -93,4 +93,3 @@ const Tag = ({ size = 'sm', icon, text, count, close, onButtonClick, maxLength =
|
|
|
93
93
|
'ncua-tag--truncated': shouldTruncate,
|
|
94
94
|
}), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: [icon && sideSlotRender(icon), _jsx("span", { className: "ncua-tag__text", children: displayText }), count && _jsx("span", { className: "ncua-tag__count", children: count }), close && (_jsx("button", { type: "button", className: "ncua-tag__close", onClick: onButtonClick, children: _jsx(XClose, { color: COLOR.gray300, width: iconSize[size], height: iconSize[size] }) })), shouldTruncate && isTooltipVisible && (_jsx("span", { ref: tooltipRef, className: classNames('ncua-tag__tooltip', `ncua-tag__tooltip--${calculatedPosition}`), children: _jsx("span", { className: "ncua-tag__tooltip-content", children: text }) }))] }));
|
|
95
95
|
};
|
|
96
|
-
export { Tag };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
type CalculatedPosition = 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
1
2
|
interface TooltipProps {
|
|
2
3
|
tooltipType?: 'white' | 'black';
|
|
3
4
|
iconType?: 'stroke' | 'fill';
|
|
4
|
-
position?:
|
|
5
|
+
position?: CalculatedPosition | 'auto';
|
|
5
6
|
size?: 'sm' | 'md';
|
|
6
7
|
hideArrow?: boolean;
|
|
7
8
|
title?: string;
|
|
@@ -10,6 +11,7 @@ interface TooltipProps {
|
|
|
10
11
|
className?: string;
|
|
11
12
|
iconColor?: string;
|
|
12
13
|
iconStyle?: 'help-circle' | 'alert-circle';
|
|
14
|
+
zIndex?: number;
|
|
13
15
|
}
|
|
14
|
-
export declare const Tooltip: ({ tooltipType, iconType, position, size, title, content, hideArrow, type, iconColor, iconStyle, className, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const Tooltip: ({ tooltipType, iconType, position, size, title, content, hideArrow, type, iconColor, iconStyle, className, zIndex, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
export {};
|
|
@@ -1,82 +1,133 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { AlertCircle, AlertCircleFill, HelpCircle, HelpCircleFill } from '@ncds/ui-admin-icon';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import { useCallback, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
5
|
+
import { createPortal } from 'react-dom';
|
|
5
6
|
import { ButtonCloseX } from '../button/ButtonCloseX';
|
|
6
7
|
const ICON_SIZE_SM = 14;
|
|
7
8
|
const ICON_SIZE_DEFAULT = 16;
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
// HTML 구현체(assets/scripts/tooltip)와 동일한 상수
|
|
10
|
+
const TOOLTIP_OFFSET = 6;
|
|
11
|
+
const VIEWPORT_MARGIN = 8;
|
|
12
|
+
const EDGE_ALIGN_OFFSET = 12;
|
|
13
|
+
const OFFSCREEN = -99999;
|
|
14
|
+
// HTML 구현체(TooltipLayerManager)가 body에 만드는 `#tooltip-global-layer`와 동일 id.
|
|
15
|
+
// 둘 중 한쪽만 바뀌면 포털이 body로 fallback되며 사일런트 동작 이상이 날 수 있으므로 함께 유지한다.
|
|
16
|
+
const GLOBAL_LAYER_ID = 'tooltip-global-layer';
|
|
17
|
+
// body 하위의 전역 레이어를 찾거나 없으면 body로 fallback
|
|
18
|
+
const resolvePortalTarget = () => {
|
|
19
|
+
if (typeof document === 'undefined')
|
|
20
|
+
return null;
|
|
21
|
+
return document.getElementById(GLOBAL_LAYER_ID) ?? document.body;
|
|
22
|
+
};
|
|
23
|
+
// 앵커 rect와 패널 rect를 기반으로 viewport 고정 좌표 계산
|
|
24
|
+
const computePanelCoords = (prefer, anchor, panel) => {
|
|
25
|
+
let resolved = prefer;
|
|
26
|
+
if (resolved === 'auto') {
|
|
27
|
+
const enoughTop = anchor.top - TOOLTIP_OFFSET - panel.height >= VIEWPORT_MARGIN;
|
|
28
|
+
resolved = enoughTop ? 'top' : 'bottom';
|
|
18
29
|
}
|
|
19
|
-
|
|
20
|
-
|
|
30
|
+
let top = 0;
|
|
31
|
+
let left = 0;
|
|
32
|
+
let calculatedPosition = 'bottom';
|
|
33
|
+
if (resolved === 'bottom') {
|
|
34
|
+
top = anchor.bottom + TOOLTIP_OFFSET;
|
|
35
|
+
left = anchor.left + anchor.width / 2 - panel.width / 2;
|
|
36
|
+
calculatedPosition = 'bottom';
|
|
21
37
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const tooltipWidth = tooltipRect.width || DEFAULT_TOOLTIP_WIDTH;
|
|
42
|
-
const tooltipHeight = tooltipRect.height || DEFAULT_TOOLTIP_HEIGHT;
|
|
43
|
-
for (const position of POSITION_PRIORITY) {
|
|
44
|
-
if (!hasEnoughSpace(position, spaces, tooltipWidth, tooltipHeight)) {
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
|
-
const isVertical = position === 'bottom' || position === 'top';
|
|
48
|
-
if (isVertical) {
|
|
49
|
-
return resolveVerticalAlignment(position, triggerRect, tooltipWidth, viewportWidth);
|
|
50
|
-
}
|
|
51
|
-
return position;
|
|
38
|
+
else if (resolved === 'top') {
|
|
39
|
+
top = anchor.top - panel.height - TOOLTIP_OFFSET;
|
|
40
|
+
left = anchor.left + anchor.width / 2 - panel.width / 2;
|
|
41
|
+
calculatedPosition = 'top';
|
|
42
|
+
}
|
|
43
|
+
else if (resolved === 'left') {
|
|
44
|
+
top = anchor.top + anchor.height / 2 - panel.height / 2;
|
|
45
|
+
left = anchor.left - panel.width - TOOLTIP_OFFSET;
|
|
46
|
+
calculatedPosition = 'left';
|
|
47
|
+
}
|
|
48
|
+
else if (resolved === 'right') {
|
|
49
|
+
top = anchor.top + anchor.height / 2 - panel.height / 2;
|
|
50
|
+
left = anchor.right + TOOLTIP_OFFSET;
|
|
51
|
+
calculatedPosition = 'right';
|
|
52
|
+
}
|
|
53
|
+
else if (resolved === 'top-left') {
|
|
54
|
+
top = anchor.top - panel.height - TOOLTIP_OFFSET;
|
|
55
|
+
left = anchor.left - EDGE_ALIGN_OFFSET;
|
|
56
|
+
calculatedPosition = 'top-left';
|
|
52
57
|
}
|
|
53
|
-
|
|
58
|
+
else if (resolved === 'top-right') {
|
|
59
|
+
top = anchor.top - panel.height - TOOLTIP_OFFSET;
|
|
60
|
+
left = anchor.right - panel.width + EDGE_ALIGN_OFFSET;
|
|
61
|
+
calculatedPosition = 'top-right';
|
|
62
|
+
}
|
|
63
|
+
else if (resolved === 'bottom-left') {
|
|
64
|
+
top = anchor.bottom + TOOLTIP_OFFSET;
|
|
65
|
+
left = anchor.left - EDGE_ALIGN_OFFSET;
|
|
66
|
+
calculatedPosition = 'bottom-left';
|
|
67
|
+
}
|
|
68
|
+
else if (resolved === 'bottom-right') {
|
|
69
|
+
top = anchor.bottom + TOOLTIP_OFFSET;
|
|
70
|
+
left = anchor.right - panel.width + EDGE_ALIGN_OFFSET;
|
|
71
|
+
calculatedPosition = 'bottom-right';
|
|
72
|
+
}
|
|
73
|
+
left = Math.max(VIEWPORT_MARGIN, Math.min(left, window.innerWidth - panel.width - VIEWPORT_MARGIN));
|
|
74
|
+
top = Math.max(VIEWPORT_MARGIN, Math.min(top, window.innerHeight - panel.height - VIEWPORT_MARGIN));
|
|
75
|
+
return { top: Math.round(top), left: Math.round(left), calculatedPosition };
|
|
54
76
|
};
|
|
55
|
-
export const Tooltip = ({ tooltipType = 'white', iconType = 'stroke', position = 'auto', size = 'sm', title, content, hideArrow = false, type = 'short', iconColor = 'var(--gray-300)', iconStyle = 'help-circle', className, }) => {
|
|
77
|
+
export const Tooltip = ({ tooltipType = 'white', iconType = 'stroke', position = 'auto', size = 'sm', title, content, hideArrow = false, type = 'short', iconColor = 'var(--gray-300)', iconStyle = 'help-circle', className, zIndex, }) => {
|
|
56
78
|
const iconSize = size === 'sm' ? ICON_SIZE_SM : ICON_SIZE_DEFAULT;
|
|
57
|
-
const
|
|
58
|
-
const
|
|
79
|
+
const anchorRef = useRef(null);
|
|
80
|
+
const panelRef = useRef(null);
|
|
81
|
+
const rafIdRef = useRef(null);
|
|
82
|
+
const [mounted, setMounted] = useState(false);
|
|
83
|
+
const [coords, setCoords] = useState({ top: OFFSCREEN, left: OFFSCREEN });
|
|
59
84
|
const [calculatedPosition, setCalculatedPosition] = useState(position === 'auto' ? 'bottom' : position);
|
|
60
85
|
const [isVisible, setIsVisible] = useState(false);
|
|
61
86
|
const [isManuallyClose, setIsManuallyClose] = useState(false);
|
|
62
|
-
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
setMounted(true);
|
|
89
|
+
return () => {
|
|
90
|
+
if (rafIdRef.current !== null) {
|
|
91
|
+
cancelAnimationFrame(rafIdRef.current);
|
|
92
|
+
rafIdRef.current = null;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
}, []);
|
|
96
|
+
const updatePosition = useCallback(() => {
|
|
97
|
+
if (!anchorRef.current || !panelRef.current)
|
|
98
|
+
return;
|
|
99
|
+
const anchor = anchorRef.current.getBoundingClientRect();
|
|
100
|
+
const panel = panelRef.current.getBoundingClientRect();
|
|
101
|
+
const next = computePanelCoords(position, anchor, panel);
|
|
102
|
+
setCoords({ top: next.top, left: next.left });
|
|
103
|
+
setCalculatedPosition(next.calculatedPosition);
|
|
104
|
+
}, [position]);
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
if (!isVisible)
|
|
107
|
+
return;
|
|
108
|
+
updatePosition();
|
|
109
|
+
window.addEventListener('resize', updatePosition, { passive: true });
|
|
110
|
+
window.addEventListener('scroll', updatePosition, { passive: true, capture: true });
|
|
111
|
+
return () => {
|
|
112
|
+
window.removeEventListener('resize', updatePosition);
|
|
113
|
+
window.removeEventListener('scroll', updatePosition, { capture: true });
|
|
114
|
+
};
|
|
115
|
+
}, [isVisible, updatePosition]);
|
|
63
116
|
const handleMouseEnter = useCallback(() => {
|
|
64
117
|
if (isManuallyClose)
|
|
65
118
|
return;
|
|
119
|
+
// opacity 전환 전에 좌표 확정 (ref 가드는 updatePosition 내부)
|
|
120
|
+
updatePosition();
|
|
121
|
+
// 웹폰트 로드·max-content 재계산 등 비동기 layout 안정화 후 한 번 더 보정
|
|
122
|
+
// 빠른 hover in/out 시 이전 프레임 요청은 취소해 중복/unmount 후 실행 방지
|
|
123
|
+
if (rafIdRef.current !== null)
|
|
124
|
+
cancelAnimationFrame(rafIdRef.current);
|
|
125
|
+
rafIdRef.current = requestAnimationFrame(() => {
|
|
126
|
+
rafIdRef.current = null;
|
|
127
|
+
updatePosition();
|
|
128
|
+
});
|
|
66
129
|
setIsVisible(true);
|
|
67
|
-
|
|
68
|
-
// 크기 측정을 위해 임시로 measuring 클래스 추가
|
|
69
|
-
setIsMeasuring(true);
|
|
70
|
-
// 다음 렌더링 사이클에서 크기 측정
|
|
71
|
-
setTimeout(() => {
|
|
72
|
-
if (tooltipRef.current && tooltipBgRef.current) {
|
|
73
|
-
const optimalPosition = calculateOptimalPosition(tooltipRef.current, tooltipBgRef.current, 'bottom');
|
|
74
|
-
setCalculatedPosition(optimalPosition);
|
|
75
|
-
setIsMeasuring(false);
|
|
76
|
-
}
|
|
77
|
-
}, 0);
|
|
78
|
-
}
|
|
79
|
-
}, [position, isManuallyClose]);
|
|
130
|
+
}, [isManuallyClose, updatePosition]);
|
|
80
131
|
const handleMouseLeave = useCallback(() => {
|
|
81
132
|
if (type === 'short') {
|
|
82
133
|
setIsVisible(false);
|
|
@@ -93,12 +144,19 @@ export const Tooltip = ({ tooltipType = 'white', iconType = 'stroke', position =
|
|
|
93
144
|
'ncua-tooltip--stroke': iconType === 'stroke',
|
|
94
145
|
'ncua-tooltip--auto': position === 'auto',
|
|
95
146
|
}, className), [size, type, hideArrow, iconType, position, className]);
|
|
96
|
-
const
|
|
147
|
+
const panelClassName = useMemo(() => classNames('ncua-tooltip-panel', 'ncua-tooltip__bg', `ncua-tooltip__bg--${tooltipType}`, `ncua-tooltip__bg--${finalPosition}`, {
|
|
97
148
|
'ncua-tooltip__bg--visible': isVisible,
|
|
98
|
-
'ncua-tooltip__bg--measuring': isMeasuring,
|
|
99
149
|
'ncua-tooltip__bg--force-hidden': isManuallyClose,
|
|
100
|
-
}), [tooltipType, finalPosition, isVisible,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
150
|
+
}), [tooltipType, finalPosition, isVisible, isManuallyClose]);
|
|
151
|
+
const panelStyle = {
|
|
152
|
+
top: `${coords.top}px`,
|
|
153
|
+
left: `${coords.left}px`,
|
|
154
|
+
opacity: isVisible ? 1 : 0,
|
|
155
|
+
...(zIndex && { zIndex }),
|
|
156
|
+
};
|
|
157
|
+
const portalTarget = mounted ? resolvePortalTarget() : null;
|
|
158
|
+
const panel = (_jsxs("span", { ref: panelRef, className: panelClassName, style: panelStyle, children: [title && _jsx("span", { className: "ncua-tooltip__title", children: title }), content && _jsx("span", { className: "ncua-tooltip__content", children: content }), type === 'long' && (_jsx(ButtonCloseX, { className: "ncua-tooltip__close-button", size: "xs", theme: tooltipType === 'white' ? 'dark' : 'light', onClick: handleCloseClick, "aria-label": "\uD234\uD301 \uB2EB\uAE30" }))] }));
|
|
159
|
+
return (_jsxs(_Fragment, { children: [_jsxs("span", { ref: anchorRef, className: tooltipClassName, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: [iconStyle === 'help-circle' &&
|
|
160
|
+
(iconType === 'stroke' ? (_jsx(HelpCircle, { width: iconSize, height: iconSize, color: iconColor })) : (_jsx(HelpCircleFill, { width: iconSize, height: iconSize, color: iconColor }))), iconStyle === 'alert-circle' &&
|
|
161
|
+
(iconType === 'stroke' ? (_jsx(AlertCircle, { width: iconSize, height: iconSize, color: iconColor })) : (_jsx(AlertCircleFill, { width: iconSize, height: iconSize, color: iconColor })))] }), portalTarget && createPortal(panel, portalTarget)] }));
|
|
104
162
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
1
|
+
export * from './useDropdown';
|
|
2
|
+
export * from './useDropdownKeyboard';
|
|
3
|
+
export * from './useDropdownPosition';
|
|
4
|
+
export * from './useOutsideClick';
|
|
5
|
+
export * from './useScrollLock';
|
|
6
|
+
export * from './useWindowResize';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
1
|
+
export * from './useDropdown';
|
|
2
|
+
export * from './useDropdownKeyboard';
|
|
3
|
+
export * from './useDropdownPosition';
|
|
4
|
+
export * from './useOutsideClick';
|
|
5
|
+
export * from './useScrollLock';
|
|
6
|
+
export * from './useWindowResize';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * from './dropdown';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
2
|
+
export * from './useCallbackRef';
|
|
3
|
+
export * from './useMediaQuery';
|
|
4
|
+
export * from './useMergeRefs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// 기존 공통 hooks
|
|
2
2
|
// 드롭다운 관련 hooks
|
|
3
3
|
export * from './dropdown';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
export * from './useCallbackRef';
|
|
5
|
+
export * from './useMediaQuery';
|
|
6
|
+
export * from './useMergeRefs';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** AI 에이전트용 컴포넌트 메타데이터 타입 */
|
|
2
|
+
/** DES INDEX §3-1~§3-8 기준 카테고리 (commerce-rag design 네임스페이스) */
|
|
3
|
+
export type ComponentCategory = 'action' | 'input' | 'icon' | 'overlay' | 'navigation' | 'feedback' | 'layout' | 'data-display';
|
|
4
|
+
export interface ComponentMeta {
|
|
5
|
+
category: ComponentCategory;
|
|
6
|
+
aliases: string[];
|
|
7
|
+
hasChildren: boolean;
|
|
8
|
+
description: string;
|
|
9
|
+
whenToUse: string[];
|
|
10
|
+
forbiddenRules: string[];
|
|
11
|
+
seeAlso: string[];
|
|
12
|
+
jsRequired: boolean;
|
|
13
|
+
/** Props가 확장하는 HTML 요소 — 에이전트가 표준 HTML 속성 사용 가능 여부를 판단 */
|
|
14
|
+
htmlElement?: string;
|
|
15
|
+
/**
|
|
16
|
+
* render_to_html에 전달할 실제 사용 예시 props.
|
|
17
|
+
*
|
|
18
|
+
* 작성 규칙 (props-type-guide.md § usageExamples 참조):
|
|
19
|
+
* - key: 시나리오 이름 (예: "default", "withIcon", "rangePicker")
|
|
20
|
+
* - value: render_to_html의 props 파라미터에 그대로 전달 가능한 객체
|
|
21
|
+
* - 모든 required prop 포함 필수. optional은 시나리오에 필요한 것만.
|
|
22
|
+
* - 에이전트가 복사해서 바로 사용할 수 있는 수준의 실제 데이터.
|
|
23
|
+
* - 빈 문자열(""), 빈 객체({}) 금지. 의미 있는 값을 넣을 것.
|
|
24
|
+
*/
|
|
25
|
+
usageExamples?: Record<string, Record<string, unknown>>;
|
|
26
|
+
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
+
import type { SlotIconComponent } from '../side-slot';
|
|
1
2
|
/**
|
|
2
3
|
* 기본 옵션 타입
|
|
3
4
|
*/
|
|
4
5
|
export type OptionType = {
|
|
5
6
|
id: string | number;
|
|
6
7
|
label: string;
|
|
7
|
-
icon?:
|
|
8
|
-
width?: number;
|
|
9
|
-
height?: number;
|
|
10
|
-
}>;
|
|
8
|
+
icon?: SlotIconComponent;
|
|
11
9
|
};
|
|
12
10
|
/**
|
|
13
11
|
* 옵션 값 타입 (단일 또는 다중 선택)
|