sellmate-design-system-react 9.0.0-beta.8 → 9.0.0-beta.80
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/AGENTS.md +3974 -267
- package/README.md +76 -24
- package/bin/sellmate-ds.mjs +91 -59
- package/dist/components/SAccountListBox/AccountListBoxPortal.d.ts +31 -0
- package/dist/components/SAccountListBox/README.md +86 -0
- package/dist/components/SAccountListBox/SAccountListBox.d.ts +79 -0
- package/dist/components/SAccountListBox/SystemMenuPortal.d.ts +58 -0
- package/dist/components/SAccountListBox/accountListBox.config.d.ts +64 -0
- package/dist/components/SAccountListBox/index.d.ts +2 -0
- package/dist/components/SActionModal/README.md +1 -0
- package/dist/components/SActionModal/SActionModal.d.ts +9 -1
- package/dist/components/SBadge/README.md +27 -0
- package/dist/components/SBadge/SBadge.d.ts +1 -1
- package/dist/components/SBarChart/README.md +122 -0
- package/dist/components/SBarChart/SBarChart.d.ts +99 -0
- package/dist/components/SBarChart/barChart.config.d.ts +85 -0
- package/dist/components/SBarChart/index.d.ts +2 -0
- package/dist/components/SBarcodeInput/README.md +14 -4
- package/dist/components/SBarcodeInput/SBarcodeInput.d.ts +25 -3
- package/dist/components/SButton/README.md +40 -0
- package/dist/components/SCalendar/README.md +13 -0
- package/dist/components/SCalendarBoard/CalendarDayCard.d.ts +53 -0
- package/dist/components/SCalendarBoard/CalendarDayEventListBox.d.ts +26 -0
- package/dist/components/SCalendarBoard/CalendarEventButton.d.ts +20 -0
- package/dist/components/SCalendarBoard/CalendarMoreButton.d.ts +18 -0
- package/dist/components/SCalendarBoard/README.md +148 -0
- package/dist/components/SCalendarBoard/SCalendarBoard.d.ts +83 -0
- package/dist/components/SCalendarBoard/calendar-board-layout.d.ts +59 -0
- package/dist/components/SCalendarBoard/calendarBoard.config.d.ts +38 -0
- package/dist/components/SCalendarBoard/index.d.ts +3 -0
- package/dist/components/SCalendarBoard/types.d.ts +40 -0
- package/dist/components/SCallout/README.md +17 -1
- package/dist/components/SCallout/SCallout.d.ts +14 -4
- package/dist/components/SCard/README.md +17 -0
- package/dist/components/SCard/SCard.d.ts +26 -2
- package/dist/components/SChatAttachedFile/README.md +33 -0
- package/dist/components/SChatAttachedFile/SChatAttachedFile.d.ts +13 -0
- package/dist/components/SChatAttachedFile/chatAttachedFile.config.d.ts +23 -0
- package/dist/components/SChatAttachedFile/index.d.ts +2 -0
- package/dist/components/SChatFile/README.md +33 -0
- package/dist/components/SChatFile/SChatFile.d.ts +37 -0
- package/dist/components/SChatFile/chatFile.config.d.ts +56 -0
- package/dist/components/SChatFile/index.d.ts +2 -0
- package/dist/components/SChatInput/README.md +44 -0
- package/dist/components/SChatInput/SChatInput.d.ts +60 -0
- package/dist/components/SChatInput/index.d.ts +1 -0
- package/dist/components/SChatMessage/README.md +86 -0
- package/dist/components/SChatMessage/SChatMessage.d.ts +123 -0
- package/dist/components/SChatMessage/index.d.ts +1 -0
- package/dist/components/SChatSystemMessage/README.md +12 -0
- package/dist/components/SChatSystemMessage/SChatSystemMessage.d.ts +18 -0
- package/dist/components/SChatSystemMessage/index.d.ts +1 -0
- package/dist/components/SCheckbox/README.md +8 -0
- package/dist/components/SChip/README.md +25 -0
- package/dist/components/SChip/SChip.d.ts +8 -0
- package/dist/components/SChip/index.d.ts +1 -1
- package/dist/components/SChipFilter/README.md +369 -14
- package/dist/components/SChipFilter/SChipFilter.d.ts +169 -60
- package/dist/components/SChipFilter/index.d.ts +1 -1
- package/dist/components/SChipInput/README.md +18 -2
- package/dist/components/SChipInput/SChipInput.d.ts +23 -3
- package/dist/components/SChipInput/index.d.ts +1 -1
- package/dist/components/SCircleProgress/README.md +13 -2
- package/dist/components/SCircleProgress/SCircleProgress.d.ts +11 -3
- package/dist/components/SConfirmModal/README.md +13 -4
- package/dist/components/SConfirmModal/SConfirmModal.d.ts +46 -9
- package/dist/components/SContextAlert/README.md +52 -0
- package/dist/components/SContextAlert/SContextAlert.d.ts +51 -0
- package/dist/components/SContextAlert/contextAlert.config.d.ts +22 -0
- package/dist/components/SContextAlert/index.d.ts +2 -0
- package/dist/components/SDatePicker/README.md +22 -2
- package/dist/components/SDatePicker/SDatePicker.d.ts +42 -5
- package/dist/components/SDateRangePicker/README.md +22 -4
- package/dist/components/SDateRangePicker/SDateRangePicker.d.ts +44 -7
- package/dist/components/SDivider/README.md +7 -0
- package/dist/components/SDivider/SDivider.d.ts +11 -0
- package/dist/components/SDonutChart/README.md +105 -0
- package/dist/components/SDonutChart/SDonutChart.d.ts +82 -0
- package/dist/components/SDonutChart/index.d.ts +1 -0
- package/dist/components/SDraggableItem/README.md +37 -0
- package/dist/components/SDraggableItem/SDraggableItem.d.ts +2 -0
- package/dist/components/SDraggableItem/index.d.ts +1 -1
- package/dist/components/SDraggableList/README.md +33 -3
- package/dist/components/SDraggableList/SDraggableList.d.ts +18 -3
- package/dist/components/SDraggableList/index.d.ts +1 -1
- package/dist/components/SDrawer/README.md +8 -0
- package/dist/components/SDropdownButton/README.md +19 -0
- package/dist/components/SEditor/EditorBody.d.ts +36 -0
- package/dist/components/SEditor/EditorToolbar.d.ts +93 -0
- package/dist/components/SEditor/README.md +205 -0
- package/dist/components/SEditor/SEditor.d.ts +128 -0
- package/dist/components/SEditor/editor-icons.d.ts +63 -0
- package/dist/components/SEditor/editor.config.d.ts +119 -0
- package/dist/components/SEditor/index.d.ts +8 -0
- package/dist/components/SEditor/tiptap-api.d.ts +29 -0
- package/dist/components/SEditor/use-is-mobile.d.ts +14 -0
- package/dist/components/SExpansionItem/README.md +38 -2
- package/dist/components/SExpansionItem/SExpansionItem.d.ts +8 -2
- package/dist/components/SExpansionItem/index.d.ts +1 -1
- package/dist/components/SField/README.md +37 -5
- package/dist/components/SField/SField.d.ts +40 -8
- package/dist/components/SField/index.d.ts +1 -1
- package/dist/components/SFilePicker/README.md +20 -4
- package/dist/components/SFilePicker/SFilePicker.d.ts +26 -6
- package/dist/components/SFooter/README.md +44 -0
- package/dist/components/SFooter/SFooter.d.ts +29 -13
- package/dist/components/SFooter/index.d.ts +1 -1
- package/dist/components/SForm/README.md +12 -1
- package/dist/components/SForm/SForm.d.ts +2 -2
- package/dist/components/SGhostButton/README.md +28 -4
- package/dist/components/SGhostButton/SGhostButton.d.ts +4 -1
- package/dist/components/SGnb/README.md +109 -8
- package/dist/components/SGnb/SGnb.d.ts +112 -11
- package/dist/components/SGnb/gnb.config.d.ts +18 -5
- package/dist/components/SGnb/index.d.ts +1 -1
- package/dist/components/SGnbSystem/README.md +186 -0
- package/dist/components/SGnbSystem/SGnbSystem.d.ts +179 -0
- package/dist/components/SGnbSystem/gnbSystem.config.d.ts +122 -0
- package/dist/components/SGnbSystem/index.d.ts +2 -0
- package/dist/components/SGuide/README.md +16 -1
- package/dist/components/SGuide/SGuide.d.ts +5 -2
- package/dist/components/SIcon/README.md +20 -0
- package/dist/components/SIcon/SIcon.d.ts +1 -1
- package/dist/components/SIcon/icons.gen.d.ts +20 -1
- package/dist/components/SImage/README.md +23 -1
- package/dist/components/SImage/SImage.d.ts +11 -8
- package/dist/components/SInput/README.md +8 -4
- package/dist/components/SInput/SInput.d.ts +17 -5
- package/dist/components/SKeyValueTable/README.md +88 -0
- package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +30 -3
- package/dist/components/SKeyValueTable/index.d.ts +1 -1
- package/dist/components/SLauncherListBox/README.md +82 -0
- package/dist/components/SLauncherListBox/SLauncherListBox.d.ts +80 -0
- package/dist/components/SLauncherListBox/index.d.ts +2 -0
- package/dist/components/SLauncherListBox/launcherListBox.config.d.ts +154 -0
- package/dist/components/SLayout/README.md +22 -1
- package/dist/components/SLayout/SLayout.d.ts +6 -2
- package/dist/components/SLayout/index.d.ts +1 -1
- package/dist/components/SLineChart/README.md +131 -0
- package/dist/components/SLineChart/SLineChart.d.ts +110 -0
- package/dist/components/SLineChart/index.d.ts +1 -0
- package/dist/components/SLineChart/lineChart.config.d.ts +95 -0
- package/dist/components/SLinearProgress/README.md +16 -1
- package/dist/components/SLinearProgress/SLinearProgress.d.ts +11 -2
- package/dist/components/SLinearProgress/index.d.ts +1 -1
- package/dist/components/SList/README.md +15 -2
- package/dist/components/SList/SList.d.ts +7 -3
- package/dist/components/SList/index.d.ts +1 -1
- package/dist/components/SListItem/README.md +43 -2
- package/dist/components/SListItem/SListItem.d.ts +8 -2
- package/dist/components/SListItem/index.d.ts +1 -1
- package/dist/components/SLoadingContainer/index.d.ts +1 -1
- package/dist/components/SLoadingContainer/loading.d.ts +41 -6
- package/dist/components/SLoadingModal/README.md +10 -2
- package/dist/components/SLoadingModal/SLoadingModal.d.ts +4 -4
- package/dist/components/SLoadingModal/index.d.ts +1 -1
- package/dist/components/SLoginCard/README.md +37 -0
- package/dist/components/SLoginCard/SLoginCard.d.ts +43 -0
- package/dist/components/SLoginCard/index.d.ts +1 -0
- package/dist/components/SLogo/README.md +103 -0
- package/dist/components/SLogo/SLogo.d.ts +72 -0
- package/dist/components/SLogo/index.d.ts +2 -0
- package/dist/components/SLogo/logo.config.d.ts +29 -0
- package/dist/components/SLogo/logos.d.ts +16 -0
- package/dist/components/SMeatballButton/README.md +67 -0
- package/dist/components/SMeatballButton/SMeatballButton.d.ts +36 -0
- package/dist/components/SMeatballButton/index.d.ts +1 -0
- package/dist/components/SModal/README.md +15 -5
- package/dist/components/SModal/SModal.d.ts +1 -1
- package/dist/components/SNumberInput/README.md +19 -8
- package/dist/components/SNumberInput/SNumberInput.d.ts +49 -7
- package/dist/components/SPage/README.md +105 -5
- package/dist/components/SPage/SPage.d.ts +34 -10
- package/dist/components/SPage/SPageHeader.d.ts +31 -13
- package/dist/components/SPage/index.d.ts +2 -2
- package/dist/components/SPage/page-column.d.ts +34 -0
- package/dist/components/SPage/page-width.d.ts +23 -0
- package/dist/components/SPage/page.config.d.ts +26 -0
- package/dist/components/SPieChart/README.md +93 -0
- package/dist/components/SPieChart/SPieChart.d.ts +73 -0
- package/dist/components/SPieChart/index.d.ts +1 -0
- package/dist/components/SPopover/README.md +15 -0
- package/dist/components/SPopup/README.md +26 -2
- package/dist/components/SPopup/SPopup.d.ts +13 -10
- package/dist/components/SPopup/index.d.ts +1 -1
- package/dist/components/SPortal/README.md +20 -0
- package/dist/components/SRadio/README.md +20 -0
- package/dist/components/SRadioButton/README.md +26 -0
- package/dist/components/SRadioButton/SRadioButton.d.ts +9 -2
- package/dist/components/SRadioCard/README.md +78 -0
- package/dist/components/SRadioCard/SRadioCard.d.ts +29 -0
- package/dist/components/SRadioCard/SRadioCardGroup.d.ts +36 -0
- package/dist/components/SRadioCard/index.d.ts +2 -0
- package/dist/components/SScrollArea/README.md +28 -0
- package/dist/components/SScrollArea/SScrollArea.d.ts +17 -0
- package/dist/components/SSearchInput/README.md +63 -0
- package/dist/components/SSearchInput/SSearchInput.d.ts +52 -0
- package/dist/components/SSearchInput/index.d.ts +1 -0
- package/dist/components/SSectionHeaderCard/README.md +38 -0
- package/dist/components/SSectionHeaderCard/SSectionHeaderCard.d.ts +19 -0
- package/dist/components/SSelect/README.md +64 -11
- package/dist/components/SSelect/SSelect.d.ts +135 -15
- package/dist/components/SSelect/index.d.ts +1 -1
- package/dist/components/SSelect/select.config.d.ts +17 -0
- package/dist/components/SSkeleton/README.md +55 -0
- package/dist/components/SSkeleton/SSkeleton.d.ts +39 -0
- package/dist/components/SSkeleton/index.d.ts +2 -0
- package/dist/components/SSkeleton/skeleton.config.d.ts +22 -0
- package/dist/components/SSplitter/README.md +17 -2
- package/dist/components/SSplitter/SSplitter.d.ts +7 -3
- package/dist/components/SStepper/README.md +26 -0
- package/dist/components/SSwitch/README.md +13 -1
- package/dist/components/SSwitch/SSwitch.d.ts +1 -3
- package/dist/components/SSystemActionButton/README.md +246 -0
- package/dist/components/SSystemActionButton/SSystemActionButton.d.ts +167 -0
- package/dist/components/SSystemActionButton/index.d.ts +2 -0
- package/dist/components/SSystemActionButton/systemActionButton.config.d.ts +93 -0
- package/dist/components/STable/README.md +135 -20
- package/dist/components/STable/STable.d.ts +292 -46
- package/dist/components/STable/index.d.ts +1 -1
- package/dist/components/STableBar/README.md +1 -0
- package/dist/components/STableBar/STableBar.d.ts +8 -1
- package/dist/components/STabs/README.md +13 -1
- package/dist/components/STabs/STabs.d.ts +2 -2
- package/dist/components/STag/README.md +55 -0
- package/dist/components/STag/STag.d.ts +3 -1
- package/dist/components/STag/tag.config.d.ts +1 -1
- package/dist/components/STextLink/README.md +21 -1
- package/dist/components/STextLink/STextLink.d.ts +5 -1
- package/dist/components/STextarea/README.md +12 -5
- package/dist/components/STextarea/STextarea.d.ts +49 -6
- package/dist/components/STimePicker/README.md +19 -2
- package/dist/components/STimePicker/STimePicker.d.ts +36 -6
- package/dist/components/STimePicker/timepicker.config.d.ts +4 -2
- package/dist/components/STimeRangePicker/README.md +31 -2
- package/dist/components/STimeRangePicker/STimeRangePicker.d.ts +35 -6
- package/dist/components/SToast/README.md +25 -1
- package/dist/components/SToast/SToast.d.ts +2 -2
- package/dist/components/SToggle/README.md +8 -0
- package/dist/components/SToggle/index.d.ts +1 -1
- package/dist/components/STooltip/README.md +27 -1
- package/dist/components/STooltip/STooltip.d.ts +1 -1
- package/dist/components/STree/README.md +42 -4
- package/dist/components/STree/STree.d.ts +18 -6
- package/dist/components/STree/STree.examples.d.ts +2 -0
- package/dist/docs/Gallery.d.ts +9 -0
- package/dist/docs/RecipeGallery.d.ts +13 -0
- package/dist/docs/gallery-previews.d.ts +24 -0
- package/dist/fonts/LICENSE.txt +94 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.0.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.1.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.10.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.11.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.12.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.13.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.14.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.15.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.16.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.17.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.18.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.19.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.2.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.20.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.21.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.22.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.23.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.24.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.25.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.26.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.27.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.28.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.29.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.3.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.30.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.31.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.32.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.33.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.34.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.35.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.36.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.37.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.38.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.39.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.4.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.40.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.41.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.42.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.43.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.44.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.45.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.46.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.47.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.48.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.49.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.5.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.50.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.51.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.52.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.53.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.54.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.55.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.56.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.57.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.58.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.59.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.6.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.60.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.61.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.62.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.63.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.64.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.65.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.66.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.67.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.68.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.69.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.7.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.70.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.71.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.72.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.73.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.74.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.75.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.76.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.77.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.78.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.79.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.8.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.80.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.81.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.82.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.83.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.84.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.85.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.86.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.87.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.88.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.89.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.9.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.90.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.91.woff2 +0 -0
- package/dist/index.cjs +21789 -10666
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +23 -0
- package/dist/index.js +21704 -10665
- package/dist/index.js.map +1 -1
- package/dist/lib/chart/cartesian.d.ts +56 -0
- package/dist/lib/chart/frame.d.ts +21 -0
- package/dist/lib/chart/hover-dim.d.ts +19 -0
- package/dist/lib/chart/legend.d.ts +21 -0
- package/dist/lib/chart/palette.d.ts +28 -0
- package/dist/lib/chart/radial.d.ts +99 -0
- package/dist/lib/chart/scale.d.ts +26 -0
- package/dist/lib/chart/tooltip.d.ts +60 -0
- package/dist/lib/chart/types.d.ts +29 -0
- package/dist/lib/chart/use-element-size.d.ts +39 -0
- package/dist/lib/date.d.ts +2 -1
- package/dist/lib/depth-filter.d.ts +27 -0
- package/dist/lib/doc-sections.d.ts +35 -0
- package/dist/lib/dropdown-menu.d.ts +19 -0
- package/dist/lib/field-width.d.ts +31 -0
- package/dist/lib/floating-height.d.ts +15 -0
- package/dist/lib/global-overlay.d.ts +5 -0
- package/dist/lib/hover-preview.d.ts +32 -0
- package/dist/lib/inert.d.ts +11 -0
- package/dist/lib/overlay-scrollbar.d.ts +32 -0
- package/dist/lib/row-metrics.d.ts +61 -0
- package/dist/lib/story-docs.d.ts +19 -3
- package/dist/llms-full.txt +9674 -2059
- package/dist/llms.txt +4062 -326
- package/dist/playground/categories.d.ts +19 -0
- package/dist/pretendard.css +937 -0
- package/dist/recipes/AppShell.d.ts +21 -0
- package/dist/recipes/CategoryManagePage.d.ts +1 -0
- package/dist/recipes/ConsultConsolePage.d.ts +1 -0
- package/dist/recipes/ExcelFilePopupPage.d.ts +5 -0
- package/dist/recipes/LoginPage.d.ts +6 -0
- package/dist/recipes/ProductBulkUploadPage.d.ts +1 -0
- package/dist/recipes/ProductCreatePage.d.ts +1 -0
- package/dist/recipes/ProductCreateSectionsPage.d.ts +5 -0
- package/dist/recipes/ProductDetailInlineEditPage.d.ts +9 -0
- package/dist/recipes/ProductDetailPage.d.ts +1 -0
- package/dist/recipes/ProductListChipFilterPage.d.ts +1 -0
- package/dist/recipes/ProductListPage.d.ts +1 -0
- package/dist/recipes/ProductOverlayPage.d.ts +1 -0
- package/dist/recipes/SalesDashboardPage.d.ts +1 -0
- package/dist/recipes/SettingsPage.d.ts +1 -0
- package/dist/recipes/StoreSetupPage.d.ts +1 -0
- package/dist/recipes/TransferOrderPopupPage.d.ts +2 -0
- package/dist/recipes/api.d.ts +220 -0
- package/dist/recipes/recipe-story.d.ts +33 -0
- package/dist/recipes/router.d.ts +9 -0
- package/dist/styles.css +3541 -262
- package/dist/theme.css +598 -28
- package/eslint/index.mjs +44 -35
- package/eslint/lib/class-names.mjs +23 -25
- package/eslint/lib/table-column.mjs +34 -8
- package/eslint/rules/component-group-gap.mjs +32 -30
- package/eslint/rules/divider-vertical-height.mjs +137 -0
- package/eslint/rules/field-width-grade.mjs +69 -52
- package/eslint/rules/no-arbitrary-class.mjs +63 -20
- package/eslint/rules/no-off-scale-spacing.mjs +61 -41
- package/eslint/rules/no-raw-html-control.mjs +38 -36
- package/eslint/rules/prefer-typo-preset.mjs +23 -17
- package/eslint/rules/require-locale-number.mjs +14 -19
- package/eslint/rules/table-column-width.mjs +114 -0
- package/eslint/rules/table-numeric-align.mjs +14 -14
- package/eslint/scale.gen.mjs +6 -3
- package/package.json +19 -5
|
@@ -8,29 +8,33 @@
|
|
|
8
8
|
|
|
9
9
|
| Prop | Type | Default | Description |
|
|
10
10
|
|------|------|---------|-------------|
|
|
11
|
-
| `columns?` | `STableColumn[]` | `[]` | |
|
|
12
|
-
| `
|
|
11
|
+
| `columns?` | `STableColumn<TRow>[]` | `[]` | |
|
|
12
|
+
| `headerGroups?` | `STableHeaderGroup[]` | — | 상위 그룹 헤더. 지정하면 기존 컬럼 헤더가 두 번째 행에 렌더링된다. |
|
|
13
|
+
| `rows?` | `TRow[]` | `[]` | |
|
|
13
14
|
| `rowKey?` | `string` | `'id'` | 행 식별 필드 |
|
|
14
15
|
| `selectable?` | `boolean` | `false` | 행 선택 체크박스 |
|
|
15
|
-
| `
|
|
16
|
+
| `dragSelectable?` | `boolean` | `false` | 행을 드래그해서 고른다. 기본 `false`. 고르는 수단만 다를 뿐 `selectable` 과 같은 선택이다 — `selected` · `onSelectedChange` · `isRowSelectable` 을 그대로 쓴다. 체크박스 열은 생기지 않고, 대신 고른 구간이 배경색과 바깥 테두리로 표시된다. **`selectable` 과 함께 켜면 `selectable` 이 이긴다** — 체크박스가 있는 표에서 드래그까지 걸리면 글자를 긁으려던 손이 선택을 갈아치운다. 둘 다 필요해 보이면 체크박스 쪽만 남긴다. 누른 자리가 구간의 기준점이고, 끌어간 자리까지가 구간이다. **새로 끌면 이전 선택은 풀린다** — 기존 선택에 더하려면 `Ctrl`(macOS 는 `Cmd`)을 짚고 끈다. 잠긴 행(`isRowSelectable`)은 구간 안에 있어도 그냥 지나간다. **켜 두면 셀 안의 글자를 긁어 복사할 수 없다** — 끌기가 곧 선택이라 글자 선택과 같은 손짓을 두고 다툰다. 값을 복사해 가는 표에는 켜지 않는다. 셀 안의 버튼·입력은 그대로 눌린다. |
|
|
17
|
+
| `contextMenuItems?` | `STableContextMenuItem[]` | — | 드래그 선택에서 **행을 오른쪽 클릭했을 때** 커서 자리에 뜨는 메뉴의 항목. 주지 않거나 비면 메뉴가 뜨지 않고 브라우저 기본 메뉴가 나온다. **`dragSelectable` 에서만 동작한다** — 체크박스 모드에서는 무시된다. 고르지 않은 행에서 누르면 **그 행만 고른 뒤** 열린다. 메뉴가 다룰 대상과 화면에 칠해진 것이 어긋나지 않게 하기 위함이다. 잠긴 행(`isRowSelectable`) 위에서는 열리지 않는다 — 고를 수 없는 행을 대상으로 삼을 수 없기 때문이다. |
|
|
18
|
+
| `isRowSelectable?` | `(row: TRow) => boolean` | — | 이 행을 고를 수 있는가. 주지 않으면 모든 행을 고를 수 있다. 고를 수 없는 행은 체크박스가 잠기고, **전체 선택·Shift 구간 선택의 셈에서도 빠진다** — 잠긴 행이 셈에 남으면 "전부 선택됨"에 닿지 못해 헤더 체크박스가 해제 방향으로 가지 못한다. 목록에서 지워 버리는 것과 다르다. 실패 0건인 차수처럼 **자리는 보여야 하지만 대상이 될 수는 없는 행**에 쓴다. 아예 대상이 아니라면 `rows` 에서 거르는 편이 낫다. 잠금은 그리기 시점의 판정일 뿐이라, 이미 `selected` 에 든 행이 나중에 잠겨도 DS 가 빼지 않는다(제어 상태를 말없이 바꾸지 않는다). 다만 헤더의 전체 해제로는 걷어낼 수 있다. |
|
|
19
|
+
| `selected?` | `TRow[]` | `[]` | |
|
|
20
|
+
| `sort?` | `STableSort \| null` | `null` | 정렬 상태 (controlled). `null`·미지정이면 정렬 없음. 컴포넌트는 정렬 상태를 갖지 않는다 — 서버 정렬이면 이 값이 곧 조회 조건이고, 뒤로가기·새로고침·링크 공유로 복원돼야 하므로 진실은 URL·store 쪽에 있어야 한다. 행을 실제로 정렬하는 것도 소비 앱 몫이다 (`STable` 은 받은 순서대로 그린다). |
|
|
16
21
|
| `resizable?` | `boolean` | `false` | 컬럼 너비 조절 |
|
|
17
22
|
| `width?` | `string` | — | |
|
|
18
23
|
| `height?` | `string` | — | |
|
|
19
|
-
| `stickyHeader?` | `boolean` | — | |
|
|
20
24
|
| `stickyColumn?` | `STableStickyColumn` | — | 고정할 좌/우 컬럼 수 |
|
|
21
25
|
| `radius?` | `'default' \| 'useTop' \| 'full'` | `'default'` | border-radius 제어 |
|
|
22
26
|
| `bordered?` | `boolean` | `true` | 바깥 테두리. 기본은 `true`. `SSectionHeaderCard` 의 `padding="none"` 안에 넣어 카드 가장자리까지 채울 때 `false` 로 끈다 — 카드가 이미 바깥 테두리를 그리므로, 켜 두면 1px 두 개가 나란히 놓여 그 변만 2px 로 보인다. 페이지네이션 바의 테두리와 1px 겹침(`-mt-px`)도 함께 꺼진다. 본문 테두리가 없으면 겹칠 대상이 없어, 그대로 두면 페이지네이션만 테두리를 갖고 1px 어긋난다. |
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
| `dense?` | `boolean` | `false` |
|
|
27
|
-
| `
|
|
27
|
+
| `emptyLabel?` | `string` | `'데이터가 없습니다.'` | |
|
|
28
|
+
| `emptySlot?` | `ReactNode` | — | 데이터가 없을 때 body 영역 전체를 대체하는 슬롯. 지정하면 `emptyLabel` 대신 이 콘텐츠가 헤더 아래 영역을 채우며, 버튼 등 인터랙션도 동작한다. |
|
|
29
|
+
| `loading?` | `boolean` | `false` | |
|
|
30
|
+
| `dense?` | `boolean` | `false` | 행 높이를 좁게 (세로 여백만 줄인다 — 좌우 패딩은 그대로). **시작 밀도이자 밀도 토글의 스위치다.** 켜면 하단 바 우측에 `좁게 보기` · `넓게 보기` 토글이 붙는다 — 페이지네이션이 없으면 이 바를 토글만 담아 그린다. 누른 뒤의 밀도는 테이블이 내부 상태로 들고 가므로 `onDenseChange` 를 받지 않아도 토글은 동작하고, 넓게 본 뒤에도 토글은 그대로 남는다(붙일지는 이 prop 이 정한다). 이 prop 값이 바뀌면 내부 밀도도 그 값으로 맞춰진다. |
|
|
31
|
+
| `hoverable?` | `boolean` | `true` | 행에 마우스를 올렸을 때 hover 배경(grey_05)을 표시할지. 기본 `true` — `false` 면 표시하지 않는다 |
|
|
28
32
|
| `pagination?` | `STablePagination` | — | 페이지네이션 (있으면 하단 표시) |
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
33
|
+
| `internalPagination?` | `boolean` | `false` | 테이블 내부에서 페이지네이션을 직접 관리 (rows를 내부 슬라이싱) |
|
|
34
|
+
| `showRowsPerPageSelect?` | `boolean` | `false` | 페이지당 행 수 셀렉트 표시 |
|
|
31
35
|
| `rowsPerPageOption?` | `SSelectOption[]` | `DEFAULT_ROWS_PER_PAGE_OPTION` | |
|
|
32
|
-
| `
|
|
33
|
-
| `rowHeight?` | `number` | — |
|
|
36
|
+
| `virtualScroll?` | `boolean` | `false` | 가상 스크롤 |
|
|
37
|
+
| `rowHeight?` | `number` | — | 행 높이의 **출발점**(px). 미지정이면 밀도에 따라 44 / 32. 행마다 높이가 달라도 된다 — 화면에 나온 행은 실제 높이를 재서 덮으므로, 이 값은 **아직 안 그려진 행의 추정치**이자 행의 최소 높이일 뿐이다. 실측이 쌓일수록 뒤쪽 추정도 그 평균으로 수렴한다. 그래서 높이가 제각각인 표에서 "가장 흔한 높이"를 넣어 두면 충분하다. 값이 실제와 멀수록 아직 안 그려진 구간의 스크롤바 길이만 덜 정확할 뿐, 그리는 위치는 어긋나지 않는다. |
|
|
34
38
|
| `virtualBuffer?` | `number` | `5` | |
|
|
35
39
|
| `virtualEndThreshold?` | `number` | `10` | |
|
|
36
40
|
| `tableId?` | `string` | — | 테이블 식별자 (없으면 자동 생성) |
|
|
@@ -41,24 +45,127 @@
|
|
|
41
45
|
|
|
42
46
|
| Event | Type | Description |
|
|
43
47
|
|-------|------|-------------|
|
|
44
|
-
| `
|
|
48
|
+
| `onContextMenuItemClick` | `(value: string \| number, rows: TRow[]) => void` | 메뉴 항목을 골랐을 때. 고른 항목의 `value` 와 **그 메뉴가 다루는 행들**이 함께 온다. 행 목록은 메뉴가 열린 시점에 확정되므로 `selected` 를 따로 읽지 않아도 된다 — 오른쪽 클릭이 선택을 바꾸는 경우(고르지 않은 행)에도 바뀐 뒤의 행이 온다. |
|
|
49
|
+
| `onSelectedChange` | `(rows: TRow[]) => void` | |
|
|
50
|
+
| `onSortChange` | `(sort: STableSort \| null) => void` | 정렬 헤더 클릭 (`asc → desc → 해제` 3단). 해제되면 `null` 이 온다. 다중 정렬은 1차 안에서 지원하지 않는다. |
|
|
51
|
+
| `onDenseChange` | `(dense: boolean) => void` | 밀도 변경 (하단 바의 밀도 토글을 눌렀을 때). 표시는 테이블이 알아서 바꾸므로 받지 않아도 되고, 사용자가 고른 밀도를 다음 방문까지 기억해 두려는(로컬 저장 등) 페이지만 받으면 된다. |
|
|
45
52
|
| `onPageChange` | `(page: number) => void` | |
|
|
46
53
|
| `onRowsPerPageChange` | `(perPage: number) => void` | |
|
|
54
|
+
| `onScroll` | `(event: ReactUIEvent<HTMLDivElement>) => void` | 본문이 스크롤될 때. **실제 스크롤에만 울린다** — 행 수·컬럼 폭·로딩이 바뀌어 내부에서 위치를 다시 잴 때는 오지 않는다. `onVirtualUpdate` 는 그리는 창이 바뀔 때만 오므로 그 사이 스크롤을 알 수 없다. 스크롤 위치를 읽어 두었다 되돌리는 것처럼 **위치 자체가 필요하면** 이쪽을 쓴다. |
|
|
47
55
|
| `onVirtualUpdate` | `(range: { from: number; to: number }) => void` | |
|
|
48
56
|
| `onVirtualReachEnd` | `(info: { from: number; to: number; rowCount: number; threshold: number; }) =>…` | |
|
|
49
|
-
| `onRowClick` | `(row:
|
|
57
|
+
| `onRowClick` | `(row: TRow) => void` | 행 클릭 |
|
|
58
|
+
| `onRowDoubleClick` | `(row: TRow) => void` | 행 더블클릭. 목록에서 상세를 여는 것처럼 **한 번 누르는 것과 다른 일**을 걸 때 쓴다. 더블클릭도 클릭 두 번이라 `onRowClick` 과 함께 주면 **`onRowClick` 이 두 번 먼저 울린다** — 둘을 함께 쓰려면 `onRowClick` 은 두 번 울려도 결과가 같은 일(행 강조 등)이어야 한다. 선택 체크박스 열과 셀 안의 버튼·링크·입력 위에서 한 더블클릭은 행 더블클릭이 아니다 — 체크박스를 빠르게 두 번 누르거나 입력의 글자를 더블클릭으로 고르다 상세가 열리지 않게 한다. |
|
|
50
59
|
|
|
51
60
|
#### Methods (ref)
|
|
52
61
|
|
|
53
62
|
| Method | Type | Description |
|
|
54
63
|
|--------|------|-------------|
|
|
55
|
-
| `isRowSelected` | `(row:
|
|
56
|
-
| `getIsAllChecked` | `(rows:
|
|
57
|
-
| `getPaginationInfo` | `<union 2종>` | 내부 페이지네이션 정보 (
|
|
64
|
+
| `isRowSelected` | `(row: TRow) => boolean` | 행 선택 여부 |
|
|
65
|
+
| `getIsAllChecked` | `(rows: TRow[]) => boolean \| null` | 주어진 행들의 전체 선택 상태 (true/false/null=indeterminate) |
|
|
66
|
+
| `getPaginationInfo` | `<union 2종>` | 내부 페이지네이션 정보 (internalPagination 아니면 null) |
|
|
58
67
|
| `getStickyStyle` | `(colIdx: number) => CSSProperties` | 컬럼 sticky 스타일 (CSS 변수 + 고정폭) |
|
|
68
|
+
| `getScrollElement` | `() => HTMLDivElement \| null` | 본문의 세로 스크롤 컨테이너. 본문이 슬롯으로 대체됐거나 아직 안 그려졌으면 `null`. 스크롤 위치를 읽고 되돌리거나, 표 안에서 스크롤 여지를 재야 할 때 쓴다 — **DOM 을 뒤져 컨테이너를 찾지 않는다.** 내부 구조는 예고 없이 바뀐다. ⚠️ `virtualScroll` 에서 **위치를 픽셀로 저장했다 되돌리는 것은 미덥지 않다.** 다시 그릴 때 아직 안 그려진 행은 추정 높이로 잡히므로, 실측이 쌓이기 전의 같은 `scrollTop` 이 다른 행을 가리킨다. 그 경우엔 위치가 아니라 **보고 있던 행**을 기억해 두는 편이 맞다. |
|
|
69
|
+
| `getFirstVisibleRow` | `() => number` | 지금 본문 맨 위에 걸린 행의 인덱스 (`rows` 기준). 행이 없으면 `0`. **스크롤 위치를 저장할 때는 픽셀이 아니라 이 값을 저장한다** — `virtualScroll` 에서 픽셀은 좌표계가 실측으로 움직이는 값이라, 되돌릴 때 다른 행을 가리킨다. |
|
|
70
|
+
| `scrollToRow` | `(index: number) => void` | 그 행이 본문 맨 위에 오도록 스크롤한다 (`rows` 기준 인덱스, 범위를 벗어나면 잘린다). `virtualScroll` 에서는 **실측이 정착할 때까지 그 행을 계속 다시 겨냥한다** — 옮기는 시점의 좌표는 아직 추정치라 한 번만 옮기면 몇 행씩 밀린다. 사용자가 직접 스크롤하면 겨냥을 놓는다. 페이지네이션을 쓰는 표에서는 **지금 페이지에 그려진 행만** 닿는다 — 다른 페이지의 행이라면 페이지를 먼저 옮긴다. |
|
|
59
71
|
| `setRowCount` | `(count: number) => void` | 가상 스크롤 총 행 수 설정 |
|
|
60
|
-
| `updateRowSelect` | `(row:
|
|
61
|
-
| `toggleSelectAll` | `(checked: boolean, rows:
|
|
72
|
+
| `updateRowSelect` | `(row: TRow) => void` | 단일 행 선택 토글 (sd-table updateRowSelect) — onSelectedChange 발생 |
|
|
73
|
+
| `toggleSelectAll` | `(checked: boolean, rows: TRow[]) => void` | 주어진 행들 전체 선택/해제 (sd-table toggleSelectAll) — onSelectedChange 발생 |
|
|
74
|
+
|
|
75
|
+
## Types
|
|
76
|
+
|
|
77
|
+
### SRow
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
/**
|
|
81
|
+
* 행 데이터의 기본 타입 — 키만 아는 느슨한 레코드다.
|
|
82
|
+
*
|
|
83
|
+
* 행 타입을 알면 `STableColumn<Order>[]` · `<STable<Order> rows={orders} />` 처럼 넘겨 좁힌다.
|
|
84
|
+
* 그러면 `render`·`format`·`onRowClick` 이 `Order` 를 받는다. 넘기지 않은 기존 코드는 이 기본값으로
|
|
85
|
+
* 예전처럼 동작한다 — 기본값을 `unknown` 으로 바꾸면 `row.statusLabel` 같은 코드가 전부 깨진다.
|
|
86
|
+
*/
|
|
87
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- 행 타입을 넘기지 않은 화면의 의도된 탈출구
|
|
88
|
+
export type SRow = Record<string, any>;
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### STableColumn
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
/**
|
|
95
|
+
* `autoWidth` 스페이서 열은 값을 그리지 않으므로 `field` 를 생략할 수 있다.
|
|
96
|
+
* 그 밖의 열은 값 접근자가 있어야 한다.
|
|
97
|
+
*/
|
|
98
|
+
export type STableColumn<TRow extends SRow = SRow> = STableColumnBase<TRow> &
|
|
99
|
+
(
|
|
100
|
+
| { autoWidth: true; field?: STableColumnField<TRow> }
|
|
101
|
+
| { autoWidth?: false; field: STableColumnField<TRow> }
|
|
102
|
+
);
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### STableHeaderGroup
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
/** 2단 헤더의 상위 셀. columnNames는 visible 컬럼 기준으로 연속되어야 한다. */
|
|
109
|
+
export interface STableHeaderGroup {
|
|
110
|
+
label?: ReactNode;
|
|
111
|
+
columnNames: string[];
|
|
112
|
+
rowSpan?: 1 | 2;
|
|
113
|
+
align?: 'left' | 'center' | 'right';
|
|
114
|
+
className?: string;
|
|
115
|
+
style?: CSSProperties;
|
|
116
|
+
render?: () => ReactNode;
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### STableContextMenuItem
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
/** 오른쪽 클릭 메뉴의 항목 한 줄 */
|
|
124
|
+
export interface STableContextMenuItem {
|
|
125
|
+
/** 클릭 시 `onContextMenuItemClick` 으로 돌아오는 값 */
|
|
126
|
+
value: string | number;
|
|
127
|
+
label: string;
|
|
128
|
+
icon?: SIconName;
|
|
129
|
+
disabled?: boolean;
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### STableSort
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
/** 정렬 상태 — 어느 열을 어느 방향으로 정렬했는가 */
|
|
137
|
+
export interface STableSort {
|
|
138
|
+
/** 정렬 기준 컬럼의 `name` */
|
|
139
|
+
name: string;
|
|
140
|
+
dir: 'asc' | 'desc';
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### STableStickyColumn
|
|
145
|
+
|
|
146
|
+
```ts
|
|
147
|
+
export interface STableStickyColumn {
|
|
148
|
+
left?: number;
|
|
149
|
+
right?: number;
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### STablePagination
|
|
154
|
+
|
|
155
|
+
```ts
|
|
156
|
+
export interface STablePagination {
|
|
157
|
+
page: number;
|
|
158
|
+
rowsPerPage: number;
|
|
159
|
+
lastPage?: number;
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### STableColumnField
|
|
164
|
+
|
|
165
|
+
```ts
|
|
166
|
+
/** 값 접근: 필드명 또는 접근 함수 */
|
|
167
|
+
export type STableColumnField<TRow extends SRow = SRow> = string | ((row: TRow) => unknown);
|
|
168
|
+
```
|
|
62
169
|
|
|
63
170
|
## Dependencies
|
|
64
171
|
|
|
@@ -66,9 +173,13 @@
|
|
|
66
173
|
|
|
67
174
|
- [SCheckbox](../SCheckbox)
|
|
68
175
|
- [SCircleProgress](../SCircleProgress)
|
|
176
|
+
- [SDivider](../SDivider)
|
|
177
|
+
- [SGhostButton](../SGhostButton)
|
|
69
178
|
- [SIcon](../SIcon)
|
|
70
179
|
- [SPagination](../SPagination)
|
|
71
180
|
- [SSelect](../SSelect)
|
|
181
|
+
- [STextLink](../STextLink)
|
|
182
|
+
- [STooltip](../STooltip)
|
|
72
183
|
|
|
73
184
|
### Graph
|
|
74
185
|
|
|
@@ -76,8 +187,12 @@
|
|
|
76
187
|
graph TD;
|
|
77
188
|
STable --> SCheckbox
|
|
78
189
|
STable --> SCircleProgress
|
|
190
|
+
STable --> SDivider
|
|
191
|
+
STable --> SGhostButton
|
|
79
192
|
STable --> SIcon
|
|
80
193
|
STable --> SPagination
|
|
81
194
|
STable --> SSelect
|
|
195
|
+
STable --> STextLink
|
|
196
|
+
STable --> STooltip
|
|
82
197
|
style STable fill:#f9f,stroke:#333,stroke-width:4px
|
|
83
198
|
```
|
|
@@ -1,14 +1,35 @@
|
|
|
1
|
-
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
-
import { type SColor } from '../../lib/color';
|
|
1
|
+
import { type CSSProperties, type UIEvent as ReactUIEvent, type ForwardedRef, type ReactElement, type ReactNode } from 'react';
|
|
3
2
|
import { type SIconName } from '../SIcon';
|
|
4
3
|
import { type SSelectOption } from '../SSelect';
|
|
4
|
+
/**
|
|
5
|
+
* 행 데이터의 기본 타입 — 키만 아는 느슨한 레코드다.
|
|
6
|
+
*
|
|
7
|
+
* 행 타입을 알면 `STableColumn<Order>[]` · `<STable<Order> rows={orders} />` 처럼 넘겨 좁힌다.
|
|
8
|
+
* 그러면 `render`·`format`·`onRowClick` 이 `Order` 를 받는다. 넘기지 않은 기존 코드는 이 기본값으로
|
|
9
|
+
* 예전처럼 동작한다 — 기본값을 `unknown` 으로 바꾸면 `row.statusLabel` 같은 코드가 전부 깨진다.
|
|
10
|
+
*/
|
|
5
11
|
export type SRow = Record<string, any>;
|
|
12
|
+
/**
|
|
13
|
+
* 셀 값(`format`·`render` 가 받는 값)의 타입.
|
|
14
|
+
*
|
|
15
|
+
* 행 타입을 좁히지 않았으면(`SRow`) 예전처럼 느슨하게 받고, 좁혔으면 `unknown` 이다 — `field` 가
|
|
16
|
+
* 접근 함수일 수도 있어 행 타입만으로는 값의 타입을 정할 수 없으므로 받는 쪽이 확인한다.
|
|
17
|
+
*/
|
|
18
|
+
export type STableCellValue<TRow extends SRow = SRow> = SRow extends TRow ? any : unknown;
|
|
19
|
+
/** 오른쪽 클릭 메뉴의 항목 한 줄 */
|
|
20
|
+
export interface STableContextMenuItem {
|
|
21
|
+
/** 클릭 시 `onContextMenuItemClick` 으로 돌아오는 값 */
|
|
22
|
+
value: string | number;
|
|
23
|
+
label: string;
|
|
24
|
+
icon?: SIconName;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
}
|
|
6
27
|
/** `STableColumn.renderCell`에 전달되는 컨텍스트 */
|
|
7
|
-
export interface STableCellContext {
|
|
8
|
-
row:
|
|
28
|
+
export interface STableCellContext<TRow extends SRow = SRow> {
|
|
29
|
+
row: TRow;
|
|
9
30
|
/** `field` + `format`이 적용된 표시 값 */
|
|
10
|
-
value:
|
|
11
|
-
column: STableColumn
|
|
31
|
+
value: STableCellValue<TRow>;
|
|
32
|
+
column: STableColumn<TRow>;
|
|
12
33
|
/** 보이는 컬럼 기준 인덱스 */
|
|
13
34
|
colIndex: number;
|
|
14
35
|
/** 현재 렌더 중인 행 목록 기준 인덱스 (페이지/가상 스크롤 윈도우 기준) */
|
|
@@ -20,24 +41,85 @@ export interface STableCellContext {
|
|
|
20
41
|
/** STable이 이 셀에 적용하려던 스타일 (패딩·정렬·폭·sticky offset 포함) */
|
|
21
42
|
style: CSSProperties;
|
|
22
43
|
}
|
|
23
|
-
|
|
44
|
+
/** 값 접근: 필드명 또는 접근 함수 */
|
|
45
|
+
export type STableColumnField<TRow extends SRow = SRow> = string | ((row: TRow) => unknown);
|
|
46
|
+
interface STableColumnBase<TRow extends SRow = SRow> {
|
|
24
47
|
name: string;
|
|
25
48
|
label: string;
|
|
26
|
-
/** 값 접근: 필드명 또는 접근 함수 */
|
|
27
|
-
field: string | ((row: SRow) => any);
|
|
28
49
|
align?: 'left' | 'center' | 'right';
|
|
29
|
-
|
|
30
|
-
|
|
50
|
+
/**
|
|
51
|
+
* 컬럼 너비. **px 로만 준다** — 숫자는 px 로 해석하고, 문자열은 `'120px'` 형태만 받는다.
|
|
52
|
+
*
|
|
53
|
+
* % · `clamp()` · `min()` 은 쓰지 않는다. 폭은 `<colgroup>` 의 `<col width>` 로 들어가는데
|
|
54
|
+
* 테이블이 `table-fixed` 라 함수형 값은 계산되지 않고 통째로 무시된다 — 화면은 조용히
|
|
55
|
+
* auto 폭으로 떨어진다. `'30%'` 는 더 나쁘게 30px 로 읽힌다.
|
|
56
|
+
*
|
|
57
|
+
* 생략하면 기본 120px 이다. 내용이 들어가는 열은 값 길이에 맞춰 폭을 명시한다 —
|
|
58
|
+
* 폭을 주지 않은 열만 다른 열에 눌려 무너지거나 늘어난다.
|
|
59
|
+
*/
|
|
60
|
+
width?: number | `${number}px`;
|
|
61
|
+
/**
|
|
62
|
+
* 고정폭 없이 남은 폭을 흡수한다 (sticky/resize 계산에서 제외).
|
|
63
|
+
*
|
|
64
|
+
* **남은 폭을 먹는 스페이서 열 하나에만 쓴다.** 내용이 들어가는 열에 주면 폭이 다른 열에
|
|
65
|
+
* 좌우돼 화면마다 달라진다 — 내용 열은 px 로 폭을 명시한다.
|
|
66
|
+
*/
|
|
31
67
|
autoWidth?: boolean;
|
|
32
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* 리사이즈 하한/상한 (px). **`resizable` 로 끄는 손잡이의 이동 범위일 뿐, 레이아웃에는
|
|
70
|
+
* 관여하지 않는다** — 폭을 주지 않은 열이 이 값 안에서 잡히는 것이 아니다.
|
|
71
|
+
*/
|
|
33
72
|
minWidth?: number;
|
|
34
73
|
maxWidth?: number;
|
|
35
74
|
/** 표시 포맷 */
|
|
36
|
-
format?: (value:
|
|
75
|
+
format?: (value: STableCellValue<TRow>, row: TRow) => string;
|
|
37
76
|
visible?: boolean;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
77
|
+
/**
|
|
78
|
+
* 헤더 라벨 뒤 도움말 툴팁 (각 항목이 한 줄). `SKeyValueTable` 의 `field.helpText` 와 같은 역할 —
|
|
79
|
+
* 라벨만으로 뜻이 통하지 않는 컬럼의 산출 기준·단위를 설명한다.
|
|
80
|
+
*
|
|
81
|
+
* `renderHeader` 로 헤더를 통째로 교체하면 그리지 않는다 (헤더 전체가 소비 앱 책임).
|
|
82
|
+
*/
|
|
83
|
+
helpText?: string[];
|
|
84
|
+
/**
|
|
85
|
+
* 라벨 뒤 필수 표시(`*`). `SKeyValueTable` 의 `field.required` 와 같은 규칙 —
|
|
86
|
+
* 그 열의 값을 반드시 채워야 하는 입력 열에만 쓴다.
|
|
87
|
+
*
|
|
88
|
+
* `renderHeader` 로 헤더를 통째로 교체하면 그리지 않는다 (헤더 전체가 소비 앱 책임).
|
|
89
|
+
*/
|
|
90
|
+
required?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* **지금 이 화면에 머문 채로** 값을 고치는 열. 라벨 뒤에 `pageEdit` 표식이 붙는다.
|
|
93
|
+
*
|
|
94
|
+
* 셀에서 바로 고치는 것도, 수정 모달·바텀시트를 띄워 고치는 것도 모두 이쪽이다 —
|
|
95
|
+
* 모달은 현재 화면 **위에** 겹쳐 뜰 뿐 화면을 떠나는 것이 아니라서 `navigable` 이 아니다.
|
|
96
|
+
*
|
|
97
|
+
* **표식일 뿐 버튼이 아니다** — 실제로 고치는 UI 는 셀(`render`)이 그린다. 표식만 켜 두면
|
|
98
|
+
* 고칠 수 있다고 해 놓고 고칠 방법이 없는 열이 된다.
|
|
99
|
+
*
|
|
100
|
+
* `renderHeader` 로 헤더를 통째로 교체하면 그리지 않는다 (헤더 전체가 소비 앱 책임).
|
|
101
|
+
*/
|
|
102
|
+
editable?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* 눌러서 **이 화면을 떠나** 다른 화면으로 가는 열 — 새 창·새 팝업으로 띄우거나 페이지를
|
|
105
|
+
* 이동한다. 라벨 뒤에 `pageMove` 표식이 붙는다.
|
|
106
|
+
*
|
|
107
|
+
* 모달로 처리하는 열은 화면을 떠나지 않으므로 여기에 해당하지 않는다. 모달에서 값을 고치면
|
|
108
|
+
* `editable`, 고치지 않고 보여주기만 하면 둘 다 붙이지 않는다.
|
|
109
|
+
*
|
|
110
|
+
* **표식일 뿐 버튼이 아니다** — 화면을 여는 것은 셀(`render`)의 링크·클릭이 한다.
|
|
111
|
+
*
|
|
112
|
+
* `renderHeader` 로 헤더를 통째로 교체하면 그리지 않는다 (헤더 전체가 소비 앱 책임).
|
|
113
|
+
*/
|
|
114
|
+
navigable?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* 정렬 가능한 열인지. 켜면 헤더 라벨 뒤에 정렬 버튼이 붙는다 — 누르는 곳은 그 버튼뿐이고
|
|
117
|
+
* 헤더 셀 전체가 클릭 영역이 되지는 않는다.
|
|
118
|
+
*
|
|
119
|
+
* 정렬 상태는 컴포넌트가 갖지 않는다 — `STable` 의 `sort` · `onSortChange` 로 주고받는다.
|
|
120
|
+
* `renderHeader` 로 헤더를 통째로 교체하면 버튼도 그리지 않는다 (헤더 전체가 소비 앱 책임).
|
|
121
|
+
*/
|
|
122
|
+
sortable?: boolean;
|
|
41
123
|
/**
|
|
42
124
|
* 셀에 무엇이 들어가는지. 좌우 여백이 여기서 갈린다 — 기본은 `text`(넓게).
|
|
43
125
|
*
|
|
@@ -49,7 +131,7 @@ export interface STableColumn {
|
|
|
49
131
|
*/
|
|
50
132
|
contentType?: 'text' | 'control';
|
|
51
133
|
/** 셀 커스텀 렌더 (React 확장) — `<td>` 안쪽 내용만 교체한다 */
|
|
52
|
-
render?: (row:
|
|
134
|
+
render?: (row: TRow, value: STableCellValue<TRow>) => ReactNode;
|
|
53
135
|
/**
|
|
54
136
|
* 셀(`<td>`) 자체를 커스텀 렌더 (React 확장). 반환한 엘리먼트가 그대로 `<td>`가 되므로
|
|
55
137
|
* `colSpan` / `rowSpan`을 직접 지정할 수 있다. `render`보다 우선한다.
|
|
@@ -60,15 +142,26 @@ export interface STableColumn {
|
|
|
60
142
|
* - 병합은 sticky 컬럼(인덱스 기준 offset 계산)과 함께 쓰지 않는 것을 전제로 한다.
|
|
61
143
|
* `rowSpan`은 행을 잘라 쓰는 가상 스크롤 / 내부 페이지네이션과 경계에서 어긋날 수 있다.
|
|
62
144
|
*/
|
|
63
|
-
renderCell?: (ctx: STableCellContext) => ReactNode;
|
|
145
|
+
renderCell?: (ctx: STableCellContext<TRow>) => ReactNode;
|
|
64
146
|
/** 헤더 셀 커스텀 렌더 (React 확장) */
|
|
65
|
-
renderHeader?: (column: STableColumn
|
|
147
|
+
renderHeader?: (column: STableColumn<TRow>, index: number) => ReactNode;
|
|
66
148
|
/** 본문 셀 커스텀 클래스. 함수를 주면 행마다 다른 클래스를 반환할 수 있다 */
|
|
67
|
-
tdClass?: string | ((row:
|
|
149
|
+
tdClass?: string | ((row: TRow) => string | undefined);
|
|
68
150
|
/** 헤더 셀 커스텀 클래스/스타일 (sd-table thClass/thStyle) */
|
|
69
151
|
thClass?: string;
|
|
70
152
|
thStyle?: CSSProperties;
|
|
71
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* `autoWidth` 스페이서 열은 값을 그리지 않으므로 `field` 를 생략할 수 있다.
|
|
156
|
+
* 그 밖의 열은 값 접근자가 있어야 한다.
|
|
157
|
+
*/
|
|
158
|
+
export type STableColumn<TRow extends SRow = SRow> = STableColumnBase<TRow> & ({
|
|
159
|
+
autoWidth: true;
|
|
160
|
+
field?: STableColumnField<TRow>;
|
|
161
|
+
} | {
|
|
162
|
+
autoWidth?: false;
|
|
163
|
+
field: STableColumnField<TRow>;
|
|
164
|
+
});
|
|
72
165
|
export interface STablePagination {
|
|
73
166
|
page: number;
|
|
74
167
|
rowsPerPage: number;
|
|
@@ -78,13 +171,29 @@ export interface STableStickyColumn {
|
|
|
78
171
|
left?: number;
|
|
79
172
|
right?: number;
|
|
80
173
|
}
|
|
174
|
+
/** 정렬 상태 — 어느 열을 어느 방향으로 정렬했는가 */
|
|
175
|
+
export interface STableSort {
|
|
176
|
+
/** 정렬 기준 컬럼의 `name` */
|
|
177
|
+
name: string;
|
|
178
|
+
dir: 'asc' | 'desc';
|
|
179
|
+
}
|
|
180
|
+
/** 2단 헤더의 상위 셀. columnNames는 visible 컬럼 기준으로 연속되어야 한다. */
|
|
181
|
+
export interface STableHeaderGroup {
|
|
182
|
+
label?: ReactNode;
|
|
183
|
+
columnNames: string[];
|
|
184
|
+
rowSpan?: 1 | 2;
|
|
185
|
+
align?: 'left' | 'center' | 'right';
|
|
186
|
+
className?: string;
|
|
187
|
+
style?: CSSProperties;
|
|
188
|
+
render?: () => ReactNode;
|
|
189
|
+
}
|
|
81
190
|
/** STable ref 명령형 API (sd-table @Method 대응) */
|
|
82
|
-
export interface STableHandle {
|
|
191
|
+
export interface STableHandle<TRow extends SRow = SRow> {
|
|
83
192
|
/** 행 선택 여부 */
|
|
84
|
-
isRowSelected: (row:
|
|
193
|
+
isRowSelected: (row: TRow) => boolean;
|
|
85
194
|
/** 주어진 행들의 전체 선택 상태 (true/false/null=indeterminate) */
|
|
86
|
-
getIsAllChecked: (rows:
|
|
87
|
-
/** 내부 페이지네이션 정보 (
|
|
195
|
+
getIsAllChecked: (rows: TRow[]) => boolean | null;
|
|
196
|
+
/** 내부 페이지네이션 정보 (internalPagination 아니면 null) */
|
|
88
197
|
getPaginationInfo: () => {
|
|
89
198
|
startIndex: number;
|
|
90
199
|
endIndex: number;
|
|
@@ -93,28 +202,119 @@ export interface STableHandle {
|
|
|
93
202
|
} | null;
|
|
94
203
|
/** 컬럼 sticky 스타일 (CSS 변수 + 고정폭) */
|
|
95
204
|
getStickyStyle: (colIdx: number) => CSSProperties;
|
|
205
|
+
/**
|
|
206
|
+
* 본문의 세로 스크롤 컨테이너. 본문이 슬롯으로 대체됐거나 아직 안 그려졌으면 `null`.
|
|
207
|
+
*
|
|
208
|
+
* 스크롤 위치를 읽고 되돌리거나, 표 안에서 스크롤 여지를 재야 할 때 쓴다 —
|
|
209
|
+
* **DOM 을 뒤져 컨테이너를 찾지 않는다.** 내부 구조는 예고 없이 바뀐다.
|
|
210
|
+
*
|
|
211
|
+
* ⚠️ `virtualScroll` 에서 **위치를 픽셀로 저장했다 되돌리는 것은 미덥지 않다.** 다시 그릴 때
|
|
212
|
+
* 아직 안 그려진 행은 추정 높이로 잡히므로, 실측이 쌓이기 전의 같은 `scrollTop` 이 다른 행을
|
|
213
|
+
* 가리킨다. 그 경우엔 위치가 아니라 **보고 있던 행**을 기억해 두는 편이 맞다.
|
|
214
|
+
*/
|
|
215
|
+
getScrollElement: () => HTMLDivElement | null;
|
|
216
|
+
/**
|
|
217
|
+
* 지금 본문 맨 위에 걸린 행의 인덱스 (`rows` 기준). 행이 없으면 `0`.
|
|
218
|
+
*
|
|
219
|
+
* **스크롤 위치를 저장할 때는 픽셀이 아니라 이 값을 저장한다** — `virtualScroll` 에서
|
|
220
|
+
* 픽셀은 좌표계가 실측으로 움직이는 값이라, 되돌릴 때 다른 행을 가리킨다.
|
|
221
|
+
*/
|
|
222
|
+
getFirstVisibleRow: () => number;
|
|
223
|
+
/**
|
|
224
|
+
* 그 행이 본문 맨 위에 오도록 스크롤한다 (`rows` 기준 인덱스, 범위를 벗어나면 잘린다).
|
|
225
|
+
*
|
|
226
|
+
* `virtualScroll` 에서는 **실측이 정착할 때까지 그 행을 계속 다시 겨냥한다** — 옮기는
|
|
227
|
+
* 시점의 좌표는 아직 추정치라 한 번만 옮기면 몇 행씩 밀린다. 사용자가 직접 스크롤하면
|
|
228
|
+
* 겨냥을 놓는다.
|
|
229
|
+
*
|
|
230
|
+
* 페이지네이션을 쓰는 표에서는 **지금 페이지에 그려진 행만** 닿는다 — 다른 페이지의
|
|
231
|
+
* 행이라면 페이지를 먼저 옮긴다.
|
|
232
|
+
*/
|
|
233
|
+
scrollToRow: (index: number) => void;
|
|
96
234
|
/** 가상 스크롤 총 행 수 설정 */
|
|
97
235
|
setRowCount: (count: number) => void;
|
|
98
236
|
/** 단일 행 선택 토글 (sd-table updateRowSelect) — onSelectedChange 발생 */
|
|
99
|
-
updateRowSelect: (row:
|
|
237
|
+
updateRowSelect: (row: TRow) => void;
|
|
100
238
|
/** 주어진 행들 전체 선택/해제 (sd-table toggleSelectAll) — onSelectedChange 발생 */
|
|
101
|
-
toggleSelectAll: (checked: boolean, rows:
|
|
239
|
+
toggleSelectAll: (checked: boolean, rows: TRow[]) => void;
|
|
102
240
|
}
|
|
103
|
-
export interface STableProps {
|
|
104
|
-
columns?: STableColumn[];
|
|
105
|
-
|
|
241
|
+
export interface STableProps<TRow extends SRow = SRow> {
|
|
242
|
+
columns?: STableColumn<TRow>[];
|
|
243
|
+
/** 상위 그룹 헤더. 지정하면 기존 컬럼 헤더가 두 번째 행에 렌더링된다. */
|
|
244
|
+
headerGroups?: STableHeaderGroup[];
|
|
245
|
+
rows?: TRow[];
|
|
106
246
|
/** 행 식별 필드 */
|
|
107
247
|
rowKey?: string;
|
|
108
248
|
/** 행 선택 체크박스 */
|
|
109
249
|
selectable?: boolean;
|
|
110
|
-
|
|
111
|
-
|
|
250
|
+
/**
|
|
251
|
+
* 행을 드래그해서 고른다. 기본 `false`.
|
|
252
|
+
*
|
|
253
|
+
* 고르는 수단만 다를 뿐 `selectable` 과 같은 선택이다 — `selected` · `onSelectedChange` ·
|
|
254
|
+
* `isRowSelectable` 을 그대로 쓴다. 체크박스 열은 생기지 않고, 대신 고른 구간이 배경색과
|
|
255
|
+
* 바깥 테두리로 표시된다.
|
|
256
|
+
*
|
|
257
|
+
* **`selectable` 과 함께 켜면 `selectable` 이 이긴다** — 체크박스가 있는 표에서 드래그까지
|
|
258
|
+
* 걸리면 글자를 긁으려던 손이 선택을 갈아치운다. 둘 다 필요해 보이면 체크박스 쪽만 남긴다.
|
|
259
|
+
*
|
|
260
|
+
* 누른 자리가 구간의 기준점이고, 끌어간 자리까지가 구간이다. **새로 끌면 이전 선택은 풀린다** —
|
|
261
|
+
* 기존 선택에 더하려면 `Ctrl`(macOS 는 `Cmd`)을 짚고 끈다. 잠긴 행(`isRowSelectable`)은
|
|
262
|
+
* 구간 안에 있어도 그냥 지나간다.
|
|
263
|
+
*
|
|
264
|
+
* **켜 두면 셀 안의 글자를 긁어 복사할 수 없다** — 끌기가 곧 선택이라 글자 선택과 같은 손짓을
|
|
265
|
+
* 두고 다툰다. 값을 복사해 가는 표에는 켜지 않는다. 셀 안의 버튼·입력은 그대로 눌린다.
|
|
266
|
+
*/
|
|
267
|
+
dragSelectable?: boolean;
|
|
268
|
+
/**
|
|
269
|
+
* 드래그 선택에서 **행을 오른쪽 클릭했을 때** 커서 자리에 뜨는 메뉴의 항목.
|
|
270
|
+
* 주지 않거나 비면 메뉴가 뜨지 않고 브라우저 기본 메뉴가 나온다.
|
|
271
|
+
*
|
|
272
|
+
* **`dragSelectable` 에서만 동작한다** — 체크박스 모드에서는 무시된다.
|
|
273
|
+
*
|
|
274
|
+
* 고르지 않은 행에서 누르면 **그 행만 고른 뒤** 열린다. 메뉴가 다룰 대상과 화면에 칠해진
|
|
275
|
+
* 것이 어긋나지 않게 하기 위함이다. 잠긴 행(`isRowSelectable`) 위에서는 열리지 않는다 —
|
|
276
|
+
* 고를 수 없는 행을 대상으로 삼을 수 없기 때문이다.
|
|
277
|
+
*/
|
|
278
|
+
contextMenuItems?: STableContextMenuItem[];
|
|
279
|
+
/**
|
|
280
|
+
* 메뉴 항목을 골랐을 때. 고른 항목의 `value` 와 **그 메뉴가 다루는 행들**이 함께 온다.
|
|
281
|
+
*
|
|
282
|
+
* 행 목록은 메뉴가 열린 시점에 확정되므로 `selected` 를 따로 읽지 않아도 된다 — 오른쪽
|
|
283
|
+
* 클릭이 선택을 바꾸는 경우(고르지 않은 행)에도 바뀐 뒤의 행이 온다.
|
|
284
|
+
*/
|
|
285
|
+
onContextMenuItemClick?: (value: string | number, rows: TRow[]) => void;
|
|
286
|
+
/**
|
|
287
|
+
* 이 행을 고를 수 있는가. 주지 않으면 모든 행을 고를 수 있다.
|
|
288
|
+
*
|
|
289
|
+
* 고를 수 없는 행은 체크박스가 잠기고, **전체 선택·Shift 구간 선택의 셈에서도 빠진다** —
|
|
290
|
+
* 잠긴 행이 셈에 남으면 "전부 선택됨"에 닿지 못해 헤더 체크박스가 해제 방향으로 가지 못한다.
|
|
291
|
+
*
|
|
292
|
+
* 목록에서 지워 버리는 것과 다르다. 실패 0건인 차수처럼 **자리는 보여야 하지만 대상이 될 수는
|
|
293
|
+
* 없는 행**에 쓴다. 아예 대상이 아니라면 `rows` 에서 거르는 편이 낫다.
|
|
294
|
+
*
|
|
295
|
+
* 잠금은 그리기 시점의 판정일 뿐이라, 이미 `selected` 에 든 행이 나중에 잠겨도 DS 가 빼지
|
|
296
|
+
* 않는다(제어 상태를 말없이 바꾸지 않는다). 다만 헤더의 전체 해제로는 걷어낼 수 있다.
|
|
297
|
+
*/
|
|
298
|
+
isRowSelectable?: (row: TRow) => boolean;
|
|
299
|
+
selected?: TRow[];
|
|
300
|
+
onSelectedChange?: (rows: TRow[]) => void;
|
|
301
|
+
/**
|
|
302
|
+
* 정렬 상태 (controlled). `null`·미지정이면 정렬 없음.
|
|
303
|
+
*
|
|
304
|
+
* 컴포넌트는 정렬 상태를 갖지 않는다 — 서버 정렬이면 이 값이 곧 조회 조건이고,
|
|
305
|
+
* 뒤로가기·새로고침·링크 공유로 복원돼야 하므로 진실은 URL·store 쪽에 있어야 한다.
|
|
306
|
+
* 행을 실제로 정렬하는 것도 소비 앱 몫이다 (`STable` 은 받은 순서대로 그린다).
|
|
307
|
+
*/
|
|
308
|
+
sort?: STableSort | null;
|
|
309
|
+
/**
|
|
310
|
+
* 정렬 헤더 클릭 (`asc → desc → 해제` 3단). 해제되면 `null` 이 온다.
|
|
311
|
+
* 다중 정렬은 1차 안에서 지원하지 않는다.
|
|
312
|
+
*/
|
|
313
|
+
onSortChange?: (sort: STableSort | null) => void;
|
|
112
314
|
/** 컬럼 너비 조절 */
|
|
113
315
|
resizable?: boolean;
|
|
114
316
|
width?: string;
|
|
115
317
|
height?: string;
|
|
116
|
-
/** @deprecated 헤더는 항상 세로 스크롤에서 제외되어 고정됩니다 (body만 세로 스크롤) */
|
|
117
|
-
stickyHeader?: boolean;
|
|
118
318
|
/** 고정할 좌/우 컬럼 수 */
|
|
119
319
|
stickyColumn?: STableStickyColumn;
|
|
120
320
|
/** border-radius 제어 */
|
|
@@ -129,30 +329,63 @@ export interface STableProps {
|
|
|
129
329
|
* 없어, 그대로 두면 페이지네이션만 테두리를 갖고 1px 어긋난다.
|
|
130
330
|
*/
|
|
131
331
|
bordered?: boolean;
|
|
132
|
-
|
|
332
|
+
emptyLabel?: string;
|
|
133
333
|
/**
|
|
134
334
|
* 데이터가 없을 때 body 영역 전체를 대체하는 슬롯.
|
|
135
|
-
* 지정하면 `
|
|
335
|
+
* 지정하면 `emptyLabel` 대신 이 콘텐츠가 헤더 아래 영역을 채우며, 버튼 등 인터랙션도 동작한다.
|
|
336
|
+
*/
|
|
337
|
+
emptySlot?: ReactNode;
|
|
338
|
+
loading?: boolean;
|
|
339
|
+
/**
|
|
340
|
+
* 행 높이를 좁게 (세로 여백만 줄인다 — 좌우 패딩은 그대로).
|
|
341
|
+
*
|
|
342
|
+
* **시작 밀도이자 밀도 토글의 스위치다.** 켜면 하단 바 우측에 `좁게 보기` · `넓게 보기` 토글이
|
|
343
|
+
* 붙는다 — 페이지네이션이 없으면 이 바를 토글만 담아 그린다.
|
|
344
|
+
*
|
|
345
|
+
* 누른 뒤의 밀도는 테이블이 내부 상태로 들고 가므로 `onDenseChange` 를 받지 않아도 토글은
|
|
346
|
+
* 동작하고, 넓게 본 뒤에도 토글은 그대로 남는다(붙일지는 이 prop 이 정한다). 이 prop 값이
|
|
347
|
+
* 바뀌면 내부 밀도도 그 값으로 맞춰진다.
|
|
136
348
|
*/
|
|
137
|
-
noDataSlot?: ReactNode;
|
|
138
|
-
isLoading?: boolean;
|
|
139
349
|
dense?: boolean;
|
|
140
|
-
/**
|
|
141
|
-
|
|
350
|
+
/**
|
|
351
|
+
* 밀도 변경 (하단 바의 밀도 토글을 눌렀을 때). 표시는 테이블이 알아서 바꾸므로 받지 않아도 되고,
|
|
352
|
+
* 사용자가 고른 밀도를 다음 방문까지 기억해 두려는(로컬 저장 등) 페이지만 받으면 된다.
|
|
353
|
+
*/
|
|
354
|
+
onDenseChange?: (dense: boolean) => void;
|
|
355
|
+
/** 행에 마우스를 올렸을 때 hover 배경(grey_05)을 표시할지. 기본 `true` — `false` 면 표시하지 않는다 */
|
|
356
|
+
hoverable?: boolean;
|
|
142
357
|
/** 페이지네이션 (있으면 하단 표시) */
|
|
143
358
|
pagination?: STablePagination;
|
|
144
359
|
onPageChange?: (page: number) => void;
|
|
145
360
|
/** 테이블 내부에서 페이지네이션을 직접 관리 (rows를 내부 슬라이싱) */
|
|
146
|
-
|
|
361
|
+
internalPagination?: boolean;
|
|
147
362
|
/** 페이지당 행 수 셀렉트 표시 */
|
|
148
|
-
|
|
363
|
+
showRowsPerPageSelect?: boolean;
|
|
149
364
|
rowsPerPageOption?: SSelectOption[];
|
|
150
365
|
onRowsPerPageChange?: (perPage: number) => void;
|
|
151
366
|
/** 가상 스크롤 */
|
|
152
|
-
|
|
367
|
+
virtualScroll?: boolean;
|
|
368
|
+
/**
|
|
369
|
+
* 행 높이의 **출발점**(px). 미지정이면 밀도에 따라 44 / 32.
|
|
370
|
+
*
|
|
371
|
+
* 행마다 높이가 달라도 된다 — 화면에 나온 행은 실제 높이를 재서 덮으므로, 이 값은
|
|
372
|
+
* **아직 안 그려진 행의 추정치**이자 행의 최소 높이일 뿐이다. 실측이 쌓일수록 뒤쪽
|
|
373
|
+
* 추정도 그 평균으로 수렴한다.
|
|
374
|
+
*
|
|
375
|
+
* 그래서 높이가 제각각인 표에서 "가장 흔한 높이"를 넣어 두면 충분하다. 값이 실제와
|
|
376
|
+
* 멀수록 아직 안 그려진 구간의 스크롤바 길이만 덜 정확할 뿐, 그리는 위치는 어긋나지 않는다.
|
|
377
|
+
*/
|
|
153
378
|
rowHeight?: number;
|
|
154
379
|
virtualBuffer?: number;
|
|
155
380
|
virtualEndThreshold?: number;
|
|
381
|
+
/**
|
|
382
|
+
* 본문이 스크롤될 때. **실제 스크롤에만 울린다** — 행 수·컬럼 폭·로딩이 바뀌어
|
|
383
|
+
* 내부에서 위치를 다시 잴 때는 오지 않는다.
|
|
384
|
+
*
|
|
385
|
+
* `onVirtualUpdate` 는 그리는 창이 바뀔 때만 오므로 그 사이 스크롤을 알 수 없다.
|
|
386
|
+
* 스크롤 위치를 읽어 두었다 되돌리는 것처럼 **위치 자체가 필요하면** 이쪽을 쓴다.
|
|
387
|
+
*/
|
|
388
|
+
onScroll?: (event: ReactUIEvent<HTMLDivElement>) => void;
|
|
156
389
|
onVirtualUpdate?: (range: {
|
|
157
390
|
from: number;
|
|
158
391
|
to: number;
|
|
@@ -166,12 +399,25 @@ export interface STableProps {
|
|
|
166
399
|
/** 테이블 식별자 (없으면 자동 생성) */
|
|
167
400
|
tableId?: string;
|
|
168
401
|
/** 행 클릭 */
|
|
169
|
-
onRowClick?: (row:
|
|
402
|
+
onRowClick?: (row: TRow) => void;
|
|
403
|
+
/**
|
|
404
|
+
* 행 더블클릭. 목록에서 상세를 여는 것처럼 **한 번 누르는 것과 다른 일**을 걸 때 쓴다.
|
|
405
|
+
*
|
|
406
|
+
* 더블클릭도 클릭 두 번이라 `onRowClick` 과 함께 주면 **`onRowClick` 이 두 번 먼저 울린다** —
|
|
407
|
+
* 둘을 함께 쓰려면 `onRowClick` 은 두 번 울려도 결과가 같은 일(행 강조 등)이어야 한다.
|
|
408
|
+
*
|
|
409
|
+
* 선택 체크박스 열과 셀 안의 버튼·링크·입력 위에서 한 더블클릭은 행 더블클릭이 아니다 —
|
|
410
|
+
* 체크박스를 빠르게 두 번 누르거나 입력의 글자를 더블클릭으로 고르다 상세가 열리지 않게 한다.
|
|
411
|
+
*/
|
|
412
|
+
onRowDoubleClick?: (row: TRow) => void;
|
|
170
413
|
className?: string;
|
|
171
414
|
style?: CSSProperties;
|
|
172
415
|
}
|
|
173
416
|
/**
|
|
174
|
-
*
|
|
175
|
-
*
|
|
417
|
+
* 행 타입을 받는 제네릭 컴포넌트로 내보낸다 — `forwardRef` 는 타입 파라미터를 지워 버리므로
|
|
418
|
+
* 바깥 시그니처만 다시 씌운다(SDraggableList 와 같은 방식). 구현 안쪽은 `SRow` 로 다룬다.
|
|
176
419
|
*/
|
|
177
|
-
export declare const STable:
|
|
420
|
+
export declare const STable: <TRow extends SRow = SRow>(props: STableProps<TRow> & {
|
|
421
|
+
ref?: ForwardedRef<STableHandle<TRow>>;
|
|
422
|
+
}) => ReactElement | null;
|
|
423
|
+
export {};
|