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
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
/** 메시지가 오는 쪽 — 받은 메시지(incoming)는 왼쪽, 보낸 메시지(outgoing)는 오른쪽에 선다. */
|
|
3
|
+
export declare const CHAT_MESSAGE_DIRECTIONS: readonly ["incoming", "outgoing"];
|
|
4
|
+
export type SChatMessageDirection = (typeof CHAT_MESSAGE_DIRECTIONS)[number];
|
|
5
|
+
/**
|
|
6
|
+
* 말풍선의 종류.
|
|
7
|
+
* - `default` 사람이 직접 쓴 메시지
|
|
8
|
+
* - `template` 미리 등록된 서식으로 보내진 메시지
|
|
9
|
+
* - `admin` 관리자·시스템이 보낸 메시지
|
|
10
|
+
*
|
|
11
|
+
* **보낸 메시지에서만 면이 갈린다.** 셋 다 사업자 쪽이 보내는 것이라 받은 메시지에는
|
|
12
|
+
* 뜻이 없고, 받은 메시지는 무엇으로 보냈든 같은 면으로 선다.
|
|
13
|
+
*/
|
|
14
|
+
export declare const CHAT_MESSAGE_VARIANTS: readonly ["default", "template", "admin"];
|
|
15
|
+
export type SChatMessageVariant = (typeof CHAT_MESSAGE_VARIANTS)[number];
|
|
16
|
+
/** 상대가 내 메시지를 읽었는지. 시각 왼쪽에 붙는다. */
|
|
17
|
+
export declare const CHAT_MESSAGE_READ_STATUSES: readonly ["read", "unread"];
|
|
18
|
+
export type SChatMessageReadStatus = (typeof CHAT_MESSAGE_READ_STATUSES)[number];
|
|
19
|
+
export interface SChatMessageProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
20
|
+
/**
|
|
21
|
+
* 받은 메시지(왼쪽)인지 보낸 메시지(오른쪽)인지.
|
|
22
|
+
*
|
|
23
|
+
* **아바타와 이름 유무도 여기서 갈린다** — 받은 메시지에만 아바타와 `sender` 가 선다.
|
|
24
|
+
* 보낸 메시지는 내가 보냈다는 것이 자리로 이미 드러나 얼굴도 이름도 필요 없다.
|
|
25
|
+
*/
|
|
26
|
+
direction: SChatMessageDirection;
|
|
27
|
+
/**
|
|
28
|
+
* 말풍선 위에 붙는 보낸 사람 이름. 없으면 자리째 빠진다.
|
|
29
|
+
*
|
|
30
|
+
* **받은 메시지에만 쓰인다** — 보낸 메시지에는 넘겨도 그리지 않는다(`direction` 참고).
|
|
31
|
+
* 앱이 데이터를 한 번만 매핑해 방향과 무관하게 넘길 수 있도록 막지 않고 무시한다.
|
|
32
|
+
*/
|
|
33
|
+
sender?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* 말풍선 아래에 붙는 시각. 표기는 앱이 정해 문자열로 넘긴다 — 대화 화면의 시각은
|
|
36
|
+
* `오후 5:52` 처럼 읽는 표기를 쓰므로 카드가 서식을 강제하지 않는다 (AGENTS.md §1-4 예외).
|
|
37
|
+
*/
|
|
38
|
+
time?: ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* 상대가 읽었는지. 시각 왼쪽에 `읽음`·`안 읽음` 으로 붙고, 주지 않으면 표시하지 않는다.
|
|
41
|
+
*
|
|
42
|
+
* **내가 보낸 메시지에만 붙인다** — 받은 메시지에 읽음 표시를 다는 것은 뜻이 없다.
|
|
43
|
+
*/
|
|
44
|
+
readStatus?: SChatMessageReadStatus;
|
|
45
|
+
/**
|
|
46
|
+
* 아바타 이미지 경로. 없으면 사람 아이콘 자리표시가 선다.
|
|
47
|
+
*
|
|
48
|
+
* **받은 메시지에만 쓰인다** — 보낸 메시지에는 아바타가 서지 않는다(`direction` 참고).
|
|
49
|
+
*/
|
|
50
|
+
avatarSrc?: string;
|
|
51
|
+
/** 아바타 대체 텍스트 */
|
|
52
|
+
avatarAlt?: string;
|
|
53
|
+
/**
|
|
54
|
+
* 같은 사람이 이어서 말한 묶음인지. 켜면 **아바타와 `sender` 를 그리지 않는다** —
|
|
55
|
+
* 말풍선이 위 묶음과 같은 선에서 시작해 한 사람의 말로 이어 읽힌다.
|
|
56
|
+
*
|
|
57
|
+
* 받은 메시지에서는 아바타 자리를 비워 둔 채 남긴다 — 안 남기면 말풍선이 44px 왼쪽으로 밀려
|
|
58
|
+
* 위 묶음과 어긋난다. 보낸 메시지는 아바타가 없으므로 이름만 숨긴다.
|
|
59
|
+
*
|
|
60
|
+
* `time`·`readStatus` 는 그대로 나온다. 시간이 벌어져 묶음을 나눴어도 얼굴은 한 번만 보이면
|
|
61
|
+
* 되고 시각은 묶음마다 필요하기 때문이다.
|
|
62
|
+
*
|
|
63
|
+
* **얼마나 벌어져야 묶음을 나눌지는 앱이 정한다** — 30분이든 하루든 대화의 성격에 달렸으므로
|
|
64
|
+
* 컴포넌트는 기준을 갖지 않고 스위치만 연다.
|
|
65
|
+
*/
|
|
66
|
+
continued?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* 말풍선 종류. `template` 은 미리 등록된 서식으로, `admin` 은 관리자·시스템이 보낸
|
|
69
|
+
* 메시지임을 각각 다른 면으로 드러낸다. 면 색은 토큰이 정하므로 여기서 색을 정하지 않는다.
|
|
70
|
+
*
|
|
71
|
+
* **보낸 메시지(`direction="outgoing"`)에만 쓰인다** — 받은 메시지에는 넘겨도 그리지 않는다.
|
|
72
|
+
* 셋 다 사업자 쪽이 보내는 것이라 받은 쪽에는 뜻이 없다. 앱이 메시지를 한 번만 매핑해
|
|
73
|
+
* 방향과 무관하게 넘길 수 있도록 막지 않고 무시한다.
|
|
74
|
+
*/
|
|
75
|
+
variant?: SChatMessageVariant;
|
|
76
|
+
/**
|
|
77
|
+
* 시각 아래에 붙는 동작 슬롯. 없으면 그 줄이 통째로 빠진다.
|
|
78
|
+
*
|
|
79
|
+
* 「상담원 연결」처럼 **이 메시지에 이어서 할 수 있는 동작**이 오는 자리다. 무엇을 놓을지는
|
|
80
|
+
* 앱이 정하고, 메시지는 줄로 세우고 방향에 맞춰 정렬하는 것까지만 한다.
|
|
81
|
+
*
|
|
82
|
+
* 시각과 같은 선에서 시작한다 — 말풍선 끝에서 한 칸 안이다.
|
|
83
|
+
*/
|
|
84
|
+
actions?: ReactNode;
|
|
85
|
+
/**
|
|
86
|
+
* 말풍선 목록. **한 항목이 말풍선 하나**가 되어 위에서 아래로 쌓인다.
|
|
87
|
+
*
|
|
88
|
+
* 한 사람이 연달아 말하면 아바타·이름·시각은 한 번만 서고 말풍선만 늘어난다 —
|
|
89
|
+
* 그 묶음이 이 컴포넌트 한 개다. 말풍선 안에는 글뿐 아니라 버튼 같은 요소도 올 수 있다.
|
|
90
|
+
*/
|
|
91
|
+
messages?: ReactNode[];
|
|
92
|
+
/**
|
|
93
|
+
* 말풍선 아래에 붙는 파일 목록. **한 항목이 칸 하나**가 되어 위에서 아래로 쌓인다.
|
|
94
|
+
*
|
|
95
|
+
* `SChatFile` 을 넣는 자리다 — 말풍선과 달리 면으로 감싸지 않고 넘긴 것을 그대로 세운다.
|
|
96
|
+
* 파일 칸은 제 면·선·라운드를 이미 갖고 있어 한 번 더 감싸면 칸이 두 겹으로 보인다.
|
|
97
|
+
*
|
|
98
|
+
* **`messages` 대신 여기로 넘긴다.** `messages` 로 넘기면 말풍선 면에 감싸여 그렇게 된다.
|
|
99
|
+
*
|
|
100
|
+
* 아바타·이름·시각·읽음 표시는 글 메시지와 똑같이 이 컴포넌트가 그린다 — 파일을 보낸 것도
|
|
101
|
+
* 대화의 한 줄이므로 행 규칙을 따로 갖지 않는다.
|
|
102
|
+
*/
|
|
103
|
+
attachments?: ReactNode[];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* SChatMessage — 대화 화면에서 한 사람이 한 번에 말한 묶음.
|
|
107
|
+
*
|
|
108
|
+
* 아바타·보낸 사람(받은 메시지만)·말풍선·시각을 한 줄로 세운다. **말풍선은 `messages` 항목 수만큼 쌓이고**
|
|
109
|
+
* 아바타·이름·시각은 그 묶음에 한 번만 붙는다 — 연달아 말한 여러 줄이 한 덩어리로 읽힌다.
|
|
110
|
+
*
|
|
111
|
+
* 시각 아래에 동작을 붙여야 하면 `actions` 슬롯에 넣는다 — 시각과 같은 선에서 시작해 방향에
|
|
112
|
+
* 맞춰 정렬된다.
|
|
113
|
+
*
|
|
114
|
+
* 시간이 벌어져 묶음을 나눠야 하는데 말한 사람은 같을 때는 `continued` 를 켠다 — 아바타 자리는
|
|
115
|
+
* 유지한 채 얼굴과 이름만 빠져, 두 묶음이 한 사람의 말로 이어 읽힌다.
|
|
116
|
+
`direction` 하나로 받은 메시지(왼쪽)와
|
|
117
|
+
* 보낸 메시지(오른쪽)가 갈리고, 그에 따라 정렬과 말풍선 색이 함께 뒤집힌다.
|
|
118
|
+
*
|
|
119
|
+
* **말풍선 폭은 내용이 정한다** — 짧은 메시지는 글자만큼만 차지하고, 길면 접힌다. 다만 반대편
|
|
120
|
+
* 끝까지 가지는 않는다: 받은 메시지는 오른쪽, 보낸 메시지는 왼쪽에 여백이 남아 어느 쪽이 말한
|
|
121
|
+
* 것인지가 폭으로도 읽힌다. 대화 폭을 더 좁히려면 이 컴포넌트가 아니라 담는 쪽을 좁힌다.
|
|
122
|
+
*/
|
|
123
|
+
export declare const SChatMessage: import("react").ForwardRefExoticComponent<SChatMessageProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SChatMessage, CHAT_MESSAGE_DIRECTIONS, CHAT_MESSAGE_READ_STATUSES, CHAT_MESSAGE_VARIANTS, type SChatMessageDirection, type SChatMessageReadStatus, type SChatMessageVariant, type SChatMessageProps, } from './SChatMessage';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# SChatSystemMessage
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SChatSystemMessage
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `message?` | `string[]` | — | 안내 문구. **항목 수만큼 알약이 쌓인다** — 서로 다른 시점에 일어난 사실은 한 알약에 몰아넣지 않고 항목을 나눈다 (`SChatMessage` 의 `messages` 와 같은 규칙). 각 항목은 **인라인 HTML 문자열을 받는다.** `<b>` `<strong>` `<i>` `<em>` `<br>` `<span>` `<a>` 만 살아남고 나머지 태그·속성과 `javascript:` 같은 위험한 스킴은 `sanitizeInlineHtml` 이 제거한다. 그래도 **서버·사용자가 만든 문자열을 그대로 넘기지 않는다** — 살균은 마지막 방어선이지 입력 검증의 대체가 아니다. ```tsx <SChatSystemMessage message={['<b>김상담</b> 상담사가 배정되었습니다.']} /> ``` |
|
|
12
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
export interface SChatSystemMessageProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
3
|
+
/**
|
|
4
|
+
* 안내 문구. **항목 수만큼 알약이 쌓인다** — 서로 다른 시점에 일어난 사실은
|
|
5
|
+
* 한 알약에 몰아넣지 않고 항목을 나눈다 (`SChatMessage` 의 `messages` 와 같은 규칙).
|
|
6
|
+
*
|
|
7
|
+
* 각 항목은 **인라인 HTML 문자열을 받는다.** `<b>` `<strong>` `<i>` `<em>` `<br>`
|
|
8
|
+
* `<span>` `<a>` 만 살아남고 나머지 태그·속성과 `javascript:` 같은 위험한 스킴은
|
|
9
|
+
* `sanitizeInlineHtml` 이 제거한다. 그래도 **서버·사용자가 만든 문자열을 그대로 넘기지 않는다** —
|
|
10
|
+
* 살균은 마지막 방어선이지 입력 검증의 대체가 아니다.
|
|
11
|
+
*
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <SChatSystemMessage message={['<b>김상담</b> 상담사가 배정되었습니다.']} />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
message?: string[];
|
|
17
|
+
}
|
|
18
|
+
export declare const SChatSystemMessage: import("react").ForwardRefExoticComponent<SChatSystemMessageProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SChatSystemMessage, type SChatSystemMessageProps } from './SChatSystemMessage';
|
|
@@ -22,6 +22,14 @@
|
|
|
22
22
|
|-------|------|-------------|
|
|
23
23
|
| `onValueChange` | `(value: boolean \| unknown[]) => void` | 값 변경 (sdUpdate) |
|
|
24
24
|
|
|
25
|
+
## Types
|
|
26
|
+
|
|
27
|
+
### SCheckboxValue
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
export type SCheckboxValue = boolean | unknown[] | null;
|
|
31
|
+
```
|
|
32
|
+
|
|
25
33
|
## Dependencies
|
|
26
34
|
|
|
27
35
|
### Used by
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
| Prop | Type | Default | Description |
|
|
10
10
|
|------|------|---------|-------------|
|
|
11
|
+
| `color?` | `SChipColor` | — | 색상. 주지 않으면 기본 회색 칩이다. 색은 기본 상태에만 입힌다 — error·편집 중·disabled 는 상태 토큰이 우선한다. 색상은 컴포넌트 토큰 `--cmp-chip-chip-<color>-{bg,content,border}` 를 참조한다. |
|
|
11
12
|
| `name?` | `string` | — | 폼 연동용 name |
|
|
12
13
|
| `value?` | `string` | `''` | 칩 텍스트 값 |
|
|
13
14
|
| `error?` | `boolean` | — | 에러 상태 |
|
|
@@ -35,6 +36,30 @@
|
|
|
35
36
|
| `focus` | `() => void` | 편집 input에 포커스합니다. |
|
|
36
37
|
| `getNativeElement` | `() => HTMLElement \| null` | 네이티브 편집 엘리먼트를 반환합니다. |
|
|
37
38
|
|
|
39
|
+
## Types
|
|
40
|
+
|
|
41
|
+
### SChipColor
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
export type SChipColor = (typeof CHIP_COLORS)[number];
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### CHIP_COLORS
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
export const CHIP_COLORS = [
|
|
51
|
+
'red',
|
|
52
|
+
'orange',
|
|
53
|
+
'yellow',
|
|
54
|
+
'green',
|
|
55
|
+
'blue',
|
|
56
|
+
'darkblue',
|
|
57
|
+
'indigo',
|
|
58
|
+
'purple',
|
|
59
|
+
'grey',
|
|
60
|
+
] as const;
|
|
61
|
+
```
|
|
62
|
+
|
|
38
63
|
## Dependencies
|
|
39
64
|
|
|
40
65
|
### Used by
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { type CSSProperties } from 'react';
|
|
2
2
|
import { type Rule } from '../../lib/form';
|
|
3
|
+
export declare const CHIP_COLORS: readonly ["red", "orange", "yellow", "green", "blue", "darkblue", "indigo", "purple", "grey"];
|
|
4
|
+
export type SChipColor = (typeof CHIP_COLORS)[number];
|
|
3
5
|
export interface SChipProps {
|
|
6
|
+
/**
|
|
7
|
+
* 색상. 주지 않으면 기본 회색 칩이다.
|
|
8
|
+
* 색은 기본 상태에만 입힌다 — error·편집 중·disabled 는 상태 토큰이 우선한다.
|
|
9
|
+
* 색상은 컴포넌트 토큰 `--cmp-chip-chip-<color>-{bg,content,border}` 를 참조한다.
|
|
10
|
+
*/
|
|
11
|
+
color?: SChipColor;
|
|
4
12
|
/** 폼 연동용 name */
|
|
5
13
|
name?: string;
|
|
6
14
|
/** 칩 텍스트 값 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { SChip, type SChipHandle, type SChipProps } from './SChip';
|
|
1
|
+
export { SChip, CHIP_COLORS, type SChipColor, type SChipHandle, type SChipProps } from './SChip';
|
|
@@ -8,11 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
| Prop | Type | Default | Description |
|
|
10
10
|
|------|------|---------|-------------|
|
|
11
|
-
| `fields?` | `
|
|
11
|
+
| `fields?` | `SChipFilterGroup[]` | — | 필터 정의 목록. 묶을 것이 없어도 한 그룹으로 감싸 넘긴다 — `[{ fields: [...] }]`. 그룹은 rule로 함께 검증하거나 divider로 갈라 놓을 때 나눈다. |
|
|
12
12
|
| `value?` | `SChipFilterValueMap` | — | 필터 값 맵 |
|
|
13
|
-
| `
|
|
14
|
-
| `label?` | `string` | `'검색 필터'` | 좌측 태그 텍스트 |
|
|
15
|
-
| `showLabel?` | `boolean` | `false` | 좌측 태그(label)·구분선 표시 여부 |
|
|
13
|
+
| `label?` | `string` | — | 좌측 태그 텍스트. 지정하면 태그와 그 뒤 구분선이 함께 노출되고, 지정하지 않으면(undefined) 둘 다 생략된다 |
|
|
16
14
|
| `showReset?` | `boolean` | `true` | 검색 초기화 링크 표시 여부 |
|
|
17
15
|
| `disabled?` | `boolean` | `false` | 바 비활성 상태 |
|
|
18
16
|
| `className?` | `string` | — | |
|
|
@@ -24,18 +22,377 @@
|
|
|
24
22
|
|-------|------|-------------|
|
|
25
23
|
| `onValueChange` | `(value: SChipFilterValueMap) => void` | 전체 값 변경 — 편집 중인 값이 바뀔 때마다(선택할 때마다) 호출된다. 실제 검색 실행은 onSearch를 쓴다 |
|
|
26
24
|
| `onFilterChange` | `(detail: SChipFilterChangeDetail) => void` | 개별 필터 값 변경 |
|
|
27
|
-
| `onSearch` | `(value: SChipFilterValueMap) => void` | 실제 검색을 실행할 시점 — 편집 팝오버의 "검색" 버튼을 누르거나 팝오버가 닫힐 때(바깥 클릭·Esc·다른 칩으로 전환 포함) 그 시점의 전체 값 맵과 함께 호출된다. 팝오버가 없는 필드(인라인 date 프리셋·custom, clearable ×, 검색 초기화)는 값이 바뀌는 즉시 호출된다. dirty 체크가 기본 적용되어 있어 — 마지막으로 실제 검색이 실행된 값 맵과 비교해 하나라도 달라진 게 없으면(예: 팝오버를 열었다 아무것도 안 바꾸고 닫는 경우) 호출되지 않는다. fields를 그룹으로 넘겼다면 rule을 만족하지 못한 그룹이 있는 동안엔 onSearch가 호출되지 않는다 — 해당 그룹의 경고 툴팁은 이 시점과 무관하게 값이 비어 있는 동안 항상 실시간으로 떠 있다(별도로 validate()를 호출할 필요 없음) |
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `onAddFilter` | `(key: string) => void` | "필터 추가" 목록에서 항목을 골랐을 때 — activeKeys를 직접 제어 중이면 이 콜백에서 (또는 onActiveKeysChange에서) key를 activeKeys에 추가해줘야 칩이 실제로 나타난다. activeKeys를 넘기지 않았다면(비제어) 별도 처리 없이도 컴포넌트가 알아서 칩을 노출한다 |
|
|
25
|
+
| `onSearch` | `(value: SChipFilterValueMap) => void` | 실제 검색을 실행할 시점 — 편집 팝오버의 "검색" 버튼을 누르거나 팝오버가 닫힐 때(바깥 클릭·Esc·다른 칩으로 전환 포함) 그 시점의 전체 값 맵과 함께 호출된다. 팝오버가 없는 필드(인라인 date 프리셋·custom, clearable ×, 검색 초기화)는 값이 바뀌는 즉시 호출된다. keyword 필터에서 Enter 로 키워드를 추가할 때도 그 즉시 호출된다 — 팝오버는 열린 채라 키워드를 이어서 더 넣을 수 있고, 넣을 때마다 조회가 갱신된다. keyword 입력창에 Enter 없이 텍스트를 남긴 채 팝오버를 닫으면 그 텍스트도 키워드로 확정한 뒤 호출된다(input: 'csv'면 콤마로 쪼개는 규칙도 그대로 적용) — 사용자가 검색어를 넣고 "검색"을 누른 조작이 입력 확정 여부 때문에 사라지지 않게 한다. dirty 체크가 기본 적용되어 있어 — 마지막으로 실제 검색이 실행된 값 맵과 비교해 하나라도 달라진 게 없으면(예: 팝오버를 열었다 아무것도 안 바꾸고 닫는 경우) 호출되지 않는다. 단 마운트 후 첫 호출은 비교할 기준이 없어 값이 처음 그대로여도 나간다 — 마운트 시 자동 조회하지 않는 화면(다이얼로그 등)에서 사용자의 첫 "검색"이 막히지 않게 하기 위함이다. fields를 그룹으로 넘겼다면 rule을 만족하지 못한 그룹이 있는 동안엔 onSearch가 호출되지 않는다 — 해당 그룹의 경고 툴팁은 이 시점과 무관하게 값이 비어 있는 동안 항상 실시간으로 떠 있다(별도로 validate()를 호출할 필요 없음). required 필드가 비어 있는 동안에도 마찬가지로 호출되지 않는다 — 정상 설정(내장 기본값 또는 defaultValue)이라면 원래 비워지지 않지만, defaultValue 없는 select-multi·keyword·custom에 required만 준 오설정에서는 "검색 초기화"·clearable이 값을 null로 비울 수 있어 이때의 안전장치다 |
|
|
26
|
+
| `onReset` | `() => void` | "검색 초기화" 클릭 — 모든 필드가 기본값(또는 null)으로 리셋되고 "필터 추가"로 꺼낸 칩이 바에서 빠진 뒤 호출된다 |
|
|
27
|
+
| `onAddFilter` | `(key: string) => void` | "필터 추가" 목록에서 항목을 골랐을 때 호출된다(알림). 칩 노출은 컴포넌트가 알아서 하므로 이 콜백에서 따로 해줄 일은 없다 |
|
|
31
28
|
|
|
32
29
|
#### Methods (ref)
|
|
33
30
|
|
|
34
31
|
| Method | Type | Description |
|
|
35
32
|
|--------|------|-------------|
|
|
36
33
|
| `open` | `(key: string) => void` | 특정 필터 편집 팝오버를 엽니다. |
|
|
37
|
-
| `reset` | `() => void` | 모든 필터
|
|
38
|
-
| `validate` | `() => boolean` |
|
|
34
|
+
| `reset` | `() => void` | 바를 처음 상태로 되돌립니다 — 모든 필터 값이 기본값(또는 null)으로 돌아가고, "필터 추가"로 꺼내 놓은 칩도 함께 빠져 fixed·required 필드만 남습니다. 열려 있던 편집 팝오버는 닫힙니다 |
|
|
35
|
+
| `validate` | `() => boolean` | 현재 값 기준으로 각 그룹의 rule을 만족하는지, 그리고 required 필드가 모두 비어 있지 않은지 반환합니다. rule을 준 그룹이 없고 required 필드도 모두 값이 있으면 항상 true. 경고 툴팁은 이 호출과 무관하게 rule 위반 상태인 동안 항상 실시간으로 떠 있으므로, 이 메서드는 그 상태를 그대로 읽어오는 용도다(예: 검색 버튼을 눌러도 되는지 사전 확인) |
|
|
36
|
+
|
|
37
|
+
## Types
|
|
38
|
+
|
|
39
|
+
### SChipFilterGroup
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
/** fields를 이루는 단위. 묶을 것이 없어도 한 그룹으로 감싸 넘긴다 — `[{ fields: [...] }]` */
|
|
43
|
+
export interface SChipFilterGroup {
|
|
44
|
+
fields: SChipFilterField[];
|
|
45
|
+
/** 지정하면 이 규칙으로 그룹을 검증한다. values가 바뀔 때마다 즉시 재평가되는 실시간 검증이라 —
|
|
46
|
+
* 그룹이 rule을 만족하지 못하면 검색 시도 여부와 무관하게 그 즉시 그룹 중앙에 경고 툴팁이 뜬다.
|
|
47
|
+
* 지정 안 하면 검증하지 않는다. */
|
|
48
|
+
rule?: SChipFilterGroupRule;
|
|
49
|
+
/** rule을 만족하지 않을 때 그룹 중앙에 띄울 툴팁 메시지. 지정 안 하면 rule 종류에 따른 기본 문구를 쓴다 */
|
|
50
|
+
tooltipMessage?: string;
|
|
51
|
+
/** 이 그룹 앞에 구분선을 넣을지. 검증(rule)과 구분선은 별개라 — 묶어서 검증만 하고 싶으면
|
|
52
|
+
* 주지 않는다. 첫 그룹에는 앞에 가를 것이 없으므로 무시된다(label을 지정했다면 그 구분선이
|
|
53
|
+
* 이미 있다) */
|
|
54
|
+
divider?: boolean;
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### SChipFilterValueMap
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
export type SChipFilterValueMap = Record<string, SChipFilterValue>;
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### SChipFilterChangeDetail
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
export interface SChipFilterChangeDetail {
|
|
68
|
+
key: string;
|
|
69
|
+
value: SChipFilterValue;
|
|
70
|
+
values: SChipFilterValueMap;
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### SChipFilterField
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
/** 필터 하나의 정의. type에 따라 쓸 수 있는 속성이 달라진다 —
|
|
78
|
+
* options는 select 계열·keyword, presets·maxRange·radioButton은
|
|
79
|
+
* datepicker-range·datepicker-statistics, render는 custom 에만 있다 */
|
|
80
|
+
export type SChipFilterField =
|
|
81
|
+
| SChipFilterSelectField
|
|
82
|
+
| SChipFilterSelectMultiField
|
|
83
|
+
| SChipFilterSelectDepthField
|
|
84
|
+
| SChipFilterSelectMultiDepthField
|
|
85
|
+
| SChipFilterDatePickerDayField
|
|
86
|
+
| SChipFilterDatePickerRangeField
|
|
87
|
+
| SChipFilterDatePickerStatisticsField
|
|
88
|
+
| SChipFilterKeywordField
|
|
89
|
+
| SChipFilterCustomField;
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### SChipFilterGroupRule
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
/** 필터 그룹 검증 규칙 */
|
|
96
|
+
export type SChipFilterGroupRule =
|
|
97
|
+
| { type: 'requireKey'; key: string }
|
|
98
|
+
| { type: 'requireAll' }
|
|
99
|
+
| { type: 'requireAny'; dataGroupName?: string };
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### SChipFilterValue
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
export type SChipFilterValue =
|
|
106
|
+
| SChipFilterOptionValue
|
|
107
|
+
| SChipFilterOptionValue[]
|
|
108
|
+
| SDateRangeValue
|
|
109
|
+
| SChipFilterKeywordValue
|
|
110
|
+
| SChipFilterPeriodValue
|
|
111
|
+
| SChipFilterCustomValue
|
|
112
|
+
| null
|
|
113
|
+
| undefined;
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### SChipFilterSelectField
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
/** 후보 하나를 고른다 */
|
|
120
|
+
export interface SChipFilterSelectField extends SChipFilterOptionsField {
|
|
121
|
+
type: 'select';
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### SChipFilterSelectMultiField
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
/** 후보 여럿을 고른다 */
|
|
129
|
+
export interface SChipFilterSelectMultiField extends SChipFilterOptionsField {
|
|
130
|
+
type: 'select-multi';
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### SChipFilterSelectDepthField
|
|
135
|
+
|
|
136
|
+
```ts
|
|
137
|
+
/** 계층 목록에서 후보 하나를 고른다. `children` 을 가진 항목은 라벨 전용 헤더라 고를 수 없다 —
|
|
138
|
+
* 값으로 올라오는 것은 리프뿐이다. 계층이 없다면 select 를 쓴다 */
|
|
139
|
+
export interface SChipFilterSelectDepthField extends SChipFilterOptionsField {
|
|
140
|
+
type: 'select-depth';
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### SChipFilterSelectMultiDepthField
|
|
145
|
+
|
|
146
|
+
```ts
|
|
147
|
+
/** 계층 목록에서 후보 여럿을 고른다. `children` 을 가진 항목은 체크박스를 달고 그 아래 리프를
|
|
148
|
+
* 한 번에 토글한다(일부만 골랐으면 부분 선택으로 표시) — 값에는 리프만 담긴다 */
|
|
149
|
+
export interface SChipFilterSelectMultiDepthField extends SChipFilterOptionsField {
|
|
150
|
+
type: 'select-multi-depth';
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### SChipFilterDatePickerDayField
|
|
155
|
+
|
|
156
|
+
```ts
|
|
157
|
+
/** 날짜 하나를 고른다 — 캘린더 트리거 하나만 놓인다. 프리셋으로 고르게 하거나 시작~종료를
|
|
158
|
+
* 받아야 하면 datepicker-range 다 */
|
|
159
|
+
export interface SChipFilterDatePickerDayField extends SChipFilterFieldBase {
|
|
160
|
+
type: 'datepicker-day';
|
|
161
|
+
/** 캘린더 트리거의 placeholder */
|
|
162
|
+
placeholder?: string;
|
|
163
|
+
/** 선택 가능 범위 */
|
|
164
|
+
selectable?: [string, string];
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### SChipFilterDatePickerRangeField
|
|
169
|
+
|
|
170
|
+
```ts
|
|
171
|
+
/** 기간(시작~종료)을 고른다. presets를 주면 프리셋 라디오 목록으로 고르고,
|
|
172
|
+
* 주지 않으면 기간 피커 하나만 놓인다 */
|
|
173
|
+
export interface SChipFilterDatePickerRangeField extends SChipFilterPresetsField {
|
|
174
|
+
type: 'datepicker-range';
|
|
175
|
+
/** presets를 필터 바에 세그먼트 라디오로 펼쳐 놓는다(팝오버 없음).
|
|
176
|
+
* 기본 false — 칩 클릭 시 팝오버 안에 세로 라디오 목록(+사용자 지정 선택 시 기간 피커) */
|
|
177
|
+
radioButton?: boolean;
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### SChipFilterDatePickerStatisticsField
|
|
182
|
+
|
|
183
|
+
```ts
|
|
184
|
+
/** 집계 단위(일·월·분기·반기·연)와 그 단위의 값을 함께 고른다 */
|
|
185
|
+
export interface SChipFilterDatePickerStatisticsField extends SChipFilterPresetsField {
|
|
186
|
+
type: 'datepicker-statistics';
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### SChipFilterKeywordField
|
|
191
|
+
|
|
192
|
+
```ts
|
|
193
|
+
/** 키워드를 입력해 누적한다. options는 입력 중 후보로만 뜬다 */
|
|
194
|
+
export interface SChipFilterKeywordField extends SChipFilterOptionsField {
|
|
195
|
+
type: 'keyword';
|
|
196
|
+
/** 입력 placeholder */
|
|
197
|
+
placeholder?: string;
|
|
198
|
+
/** 입력 방식. 기본 'tag' — Enter 로 하나씩 추가한다.
|
|
199
|
+
* 'csv' 는 쉼표도 구분자로 인정해, 쉼표를 치거나 쉼표가 섞인 텍스트를 붙여넣으면 그 자리에서
|
|
200
|
+
* 여러 개로 쪼개져 목록에 쌓인다(엑셀에서 복사한 코드 목록을 한 번에 넣는 용도).
|
|
201
|
+
* 쌓이는 목록도 값 형태도 'tag' 와 같다 — 구분자만 늘어난다. */
|
|
202
|
+
input?: SChipFilterKeywordInput;
|
|
203
|
+
/** 검색조건(포함/일치) 토글 표시 여부 */
|
|
204
|
+
matchModes?: boolean;
|
|
205
|
+
/** matchModes 활성 시 "미포함"까지 포함해 3개(포함/일치/미포함)로 노출할지.
|
|
206
|
+
* 기본 false — 2개(포함/일치)만 */
|
|
207
|
+
excludeMode?: boolean;
|
|
208
|
+
}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### SChipFilterCustomField
|
|
212
|
+
|
|
213
|
+
```ts
|
|
214
|
+
/** 칩+팝오버를 거치지 않고 바에 놓을 노드를 앱이 직접 그린다 */
|
|
215
|
+
export interface SChipFilterCustomField extends SChipFilterFieldBase {
|
|
216
|
+
type: 'custom';
|
|
217
|
+
/** 필터 바의 이 필드 자리에 놓일 노드를 직접 그린다. 반환한 노드가 그대로 바에 노출된다 —
|
|
218
|
+
* SSelect를 그대로 놓거나 SInput을 바로 노출하는 식으로 렌더 방식을 자유롭게 구성한다. */
|
|
219
|
+
render?: (ctx: {
|
|
220
|
+
value: SChipFilterValue;
|
|
221
|
+
disabled?: boolean;
|
|
222
|
+
/** 속한 그룹이 rule을 위반하는 동안 true — 직접 그린 노드에도 경고 표시를 맞추라는 신호다 */
|
|
223
|
+
warning?: boolean;
|
|
224
|
+
onValueChange: (value: SChipFilterValue) => void;
|
|
225
|
+
}) => ReactNode;
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### SChipFilterOptionValue
|
|
230
|
+
|
|
231
|
+
```ts
|
|
232
|
+
export type SChipFilterOptionValue = string | number;
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### SChipFilterKeywordValue
|
|
236
|
+
|
|
237
|
+
```ts
|
|
238
|
+
/** keyword 필드에서 matchModes 활성 시 사용하는 값 형태 — 입력해 추가한 키워드 목록 */
|
|
239
|
+
export interface SChipFilterKeywordValue {
|
|
240
|
+
keywords: string[];
|
|
241
|
+
mode: SChipFilterMatchMode;
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### SChipFilterPeriodValue
|
|
246
|
+
|
|
247
|
+
```ts
|
|
248
|
+
/** datepicker-statistics 필드 값 — 선택 단위(unit)와 그 단위의 입력값(value)을 함께 보관한다 */
|
|
249
|
+
export interface SChipFilterPeriodValue {
|
|
250
|
+
unit: SChipFilterPeriodUnit;
|
|
251
|
+
value?: string | number | SDateRangeValue | null;
|
|
252
|
+
}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### SChipFilterCustomValue
|
|
256
|
+
|
|
257
|
+
```ts
|
|
258
|
+
/** custom 필드가 자유롭게 담는 값. 형태를 강제하지 않는다 — render에서 직접 정의한 그대로 읽고 쓴다 */
|
|
259
|
+
export type SChipFilterCustomValue = Record<string, unknown>;
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### SChipFilterOptionsField
|
|
263
|
+
|
|
264
|
+
```ts
|
|
265
|
+
/** 후보 목록에서 고르는 필터 — select·select-multi·select-depth·select-multi-depth·keyword */
|
|
266
|
+
export interface SChipFilterOptionsField extends SChipFilterFieldBase {
|
|
267
|
+
/** 고를 수 있는 후보 목록. select-depth·select-multi-depth 는 `children` 으로 계층을 만든다.
|
|
268
|
+
*
|
|
269
|
+
* **`fixed`·`required` 인 select 계열에서 고를 수 있는 후보가 하나뿐이면 그 값이
|
|
270
|
+
* 자동으로 선택된다** — 사용자가 고르지 않아도 `onValueChange` 로 값이 올라온다
|
|
271
|
+
* (select 는 그 값, select-multi 는 그 값 하나짜리 배열). 옵션이 API 응답이라 늦게 도착해도
|
|
272
|
+
* 도착한 시점에 채워진다. 사용자가 그 값을 지우면 다시 채우지 않는다 —
|
|
273
|
+
* 다만 "검색 초기화"는 되돌려 놓는다(다른 기본값과 같은 규칙).
|
|
274
|
+
* 후보가 하나인데 비활성(`disabled`)이면 고를 수 없는 값이므로 채우지 않는다.
|
|
275
|
+
*
|
|
276
|
+
* 뺄 수 있는 필터(= `fixed`·`required` 가 아닌 필드)는 후보가 하나여도 채우지 않는다 —
|
|
277
|
+
* 처음에 바에 없는 필터라 보이지도 지울 수도 없는 조건이 검색에 걸리기 때문이다.
|
|
278
|
+
* 후보가 하나뿐인 필터를 반드시 걸어야 한다면 `fixed` 나 `required` 로 준다 */
|
|
279
|
+
options?: SChipFilterOption[];
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### SChipFilterFieldBase
|
|
284
|
+
|
|
285
|
+
```ts
|
|
286
|
+
/** 타입과 무관하게 모든 필터가 갖는 속성 */
|
|
287
|
+
export interface SChipFilterFieldBase {
|
|
288
|
+
/** 필터 식별자 */
|
|
289
|
+
key: string;
|
|
290
|
+
/** 칩에 표시할 레이블 */
|
|
291
|
+
label: string;
|
|
292
|
+
/** 필수 필터 표시. true면 값이 비어 있을 때 기본값(defaultValue 또는 타입별 내장 기본값)이
|
|
293
|
+
* 자동으로 채워지고, clearable은 현재 값이 기본값과 같을 땐 숨겨지며 클릭 시 기본값으로 되돌아간다.
|
|
294
|
+
* 값이 채워졌다가 다시 비면(예: value를 제어하는 부모가 onReset에서 자기 상태를 비우는 경우)
|
|
295
|
+
* 기본값이 한 번 더 채워진다 — required 필드가 빈 채로 남으면 onSearch가 막히기 때문이다.
|
|
296
|
+
* 단 그 값을 부모가 value로 받아 주지 않으면 반복해서 채우지는 않는다 */
|
|
297
|
+
required?: boolean;
|
|
298
|
+
/** 고정 필터. true면 항상 노출되고 "필터 추가" 목록에는 나타나지 않으며 칩을 제거할 수 없다.
|
|
299
|
+
* required도 같은 효과를 낸다. 나머지 필드는 "필터 추가"에서 골랐거나 value에 값이 들어
|
|
300
|
+
* 있는 동안 노출된다 — 값으로 떠 있던 칩은 값이 비면 함께 빠지고, "필터 추가"로 꺼낸 칩은
|
|
301
|
+
* 값이 없어도 세션 동안 자리를 지킨다 */
|
|
302
|
+
fixed?: boolean;
|
|
303
|
+
/** 초기값 및 clearable 클릭 시 되돌아갈 값.
|
|
304
|
+
*
|
|
305
|
+
* **`fixed` 또는 `required` 필드에서만 쓴다.** 그 외 필드에 지정하면 무시하고 콘솔에 알린다 —
|
|
306
|
+
* 뺄 수 있는 필터는 처음에 바에 없는데, 값 맵에는 기본값이 채워져 **보이지도 지울 수도 없는
|
|
307
|
+
* 조건이 검색에 걸린다.** 칩을 지워 값을 비워도 "검색 초기화"가 그 값을 되돌려 놓아 필터가
|
|
308
|
+
* 조용히 되살아난다. 처음부터 값이 정해져 있어야 하는 필터라면 그것이 `fixed`·`required` 다.
|
|
309
|
+
*
|
|
310
|
+
* required인데 지정하지 않으면 타입별 내장 기본값(select: 첫 번째 옵션,
|
|
311
|
+
* datepicker-day·datepicker-range: 오늘 날짜)을 대신 쓴다. `fixed`·`required` 인
|
|
312
|
+
* select·select-multi 는 후보가 하나뿐일 때 그 값이 기본값이 된다(options 참고) —
|
|
313
|
+
* defaultValue 를 함께 주면 그쪽이 이긴다. 인라인(radioButton) datepicker-range
|
|
314
|
+
* 필드는 팝오버 없이 바에 바로 노출되어 빈 상태로 둘 수 없으므로, 이 규칙과 무관하게 언제나
|
|
315
|
+
* 오늘이 채워진다 */
|
|
316
|
+
defaultValue?: SChipFilterValue;
|
|
317
|
+
/** 이 필터만 비활성. 바에 남아 있되 팝오버가 열리지 않고 clearable도 눌리지 않는다.
|
|
318
|
+
* 바 전체를 잠그려면 SChipFilterProps.disabled를 쓴다 — 둘은 OR로 합쳐진다 */
|
|
319
|
+
disabled?: boolean;
|
|
320
|
+
}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### SChipFilterPresetsField
|
|
324
|
+
|
|
325
|
+
```ts
|
|
326
|
+
/** 프리셋으로 기간을 고르는 필터 — datepicker-range·datepicker-statistics */
|
|
327
|
+
export interface SChipFilterPresetsField extends SChipFilterFieldBase {
|
|
328
|
+
/** 프리셋 라디오 목록. 지정하지 않으면 타입별 기본 목록을 쓴다 —
|
|
329
|
+
* datepicker-range: 오늘·지난 7일·지난 30일·사용자 지정,
|
|
330
|
+
* datepicker-statistics: 일별·월별·분기별·반기별·연도별·사용자 지정.
|
|
331
|
+
* 프리셋 라디오 없이 캘린더(datepicker-range) 하나만 두려면 presets: [] 를 명시한다 */
|
|
332
|
+
presets?: SChipFilterDatePreset[];
|
|
333
|
+
/** 선택 가능 범위 */
|
|
334
|
+
selectable?: [string, string];
|
|
335
|
+
/** "사용자 지정" 프리셋으로 기간을 고를 때의 최대 선택 일수.
|
|
336
|
+
* 지정하지 않아도 presets에 custom 프리셋이 있으면 기본 90일이 적용된다 — 무제한 기간
|
|
337
|
+
* 집계·조회로 백엔드에 과도한 요청이 가는 것을 막기 위한 안전장치. 다른 상한이 필요하면
|
|
338
|
+
* 이 값을 직접 지정한다 */
|
|
339
|
+
maxRange?: number;
|
|
340
|
+
}
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### SChipFilterKeywordInput
|
|
344
|
+
|
|
345
|
+
```ts
|
|
346
|
+
/** keyword 필드의 입력 방식 — 무엇을 키워드 하나의 끝으로 볼지 */
|
|
347
|
+
export type SChipFilterKeywordInput = 'tag' | 'csv';
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### SChipFilterMatchMode
|
|
351
|
+
|
|
352
|
+
```ts
|
|
353
|
+
export type SChipFilterMatchMode = 'contains' | 'exact' | 'excludes';
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### SChipFilterPeriodUnit
|
|
357
|
+
|
|
358
|
+
```ts
|
|
359
|
+
export type SChipFilterPeriodUnit = 'day' | 'month' | 'quarter' | 'half' | 'year' | 'custom';
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### SChipFilterOption
|
|
363
|
+
|
|
364
|
+
```ts
|
|
365
|
+
export interface SChipFilterOption {
|
|
366
|
+
value: SChipFilterOptionValue;
|
|
367
|
+
label: string;
|
|
368
|
+
disabled?: boolean;
|
|
369
|
+
/** 하위 옵션. children 을 가진 항목은 **고를 수 없는 그룹 헤더**이고, 값으로 올라오는 것은
|
|
370
|
+
* 언제나 리프(children 없는 항목)의 value 뿐이다. 단일 타입에서 헤더는 라벨만, 다중 타입에서는
|
|
371
|
+
* 체크박스를 달고 그 아래 전체를 한 번에 토글한다.
|
|
372
|
+
*
|
|
373
|
+
* **계층을 담은 필드는 `select-depth`·`select-multi-depth` 로 선언한다.** 목록은 타입 이름이
|
|
374
|
+
* 아니라 children 유무를 보고 그리므로 `select`·`select-multi` 에 줘도 계층으로 그려지지만,
|
|
375
|
+
* 그러면 그 필드가 계층이라는 사실이 코드 어디에도 남지 않는다 */
|
|
376
|
+
children?: SChipFilterOption[];
|
|
377
|
+
}
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### SChipFilterDatePreset
|
|
381
|
+
|
|
382
|
+
```ts
|
|
383
|
+
/** datepicker-range·datepicker-statistics 필드의 프리셋 라디오 항목 (오늘/지난 7일/일별/월별/사용자 지정 등) */
|
|
384
|
+
export interface SChipFilterDatePreset {
|
|
385
|
+
/** 프리셋 식별자 */
|
|
386
|
+
value: string;
|
|
387
|
+
/** 라벨 */
|
|
388
|
+
label: string;
|
|
389
|
+
/** true면 "사용자 지정" — 선택 시 날짜/기간 피커가 추가로 노출된다. resolve는 무시된다. */
|
|
390
|
+
custom?: boolean;
|
|
391
|
+
/** custom이 아닐 때 실제 값을 계산한다. 단일 날짜(string) 또는 기간([start,end]) 모두 가능 —
|
|
392
|
+
* datepicker-range 에서는 'd' 를 그 하루짜리 기간 ['d', 'd'] 와 같은 값으로 본다 */
|
|
393
|
+
resolve?: () => string | SDateRangeValue;
|
|
394
|
+
}
|
|
395
|
+
```
|
|
39
396
|
|
|
40
397
|
## Dependencies
|
|
41
398
|
|
|
@@ -43,11 +400,10 @@
|
|
|
43
400
|
|
|
44
401
|
- [SDatePicker](../SDatePicker)
|
|
45
402
|
- [SDateRangePicker](../SDateRangePicker)
|
|
46
|
-
- [SGhostButton](../SGhostButton)
|
|
47
403
|
- [SIcon](../SIcon)
|
|
48
404
|
- [SRadio](../SRadio)
|
|
49
405
|
- [SRadioButton](../SRadioButton)
|
|
50
|
-
- [
|
|
406
|
+
- [SSearchInput](../SSearchInput)
|
|
51
407
|
- [STag](../STag)
|
|
52
408
|
- [STextLink](../STextLink)
|
|
53
409
|
- [STooltip](../STooltip)
|
|
@@ -58,11 +414,10 @@
|
|
|
58
414
|
graph TD;
|
|
59
415
|
SChipFilter --> SDatePicker
|
|
60
416
|
SChipFilter --> SDateRangePicker
|
|
61
|
-
SChipFilter --> SGhostButton
|
|
62
417
|
SChipFilter --> SIcon
|
|
63
418
|
SChipFilter --> SRadio
|
|
64
419
|
SChipFilter --> SRadioButton
|
|
65
|
-
SChipFilter -->
|
|
420
|
+
SChipFilter --> SSearchInput
|
|
66
421
|
SChipFilter --> STag
|
|
67
422
|
SChipFilter --> STextLink
|
|
68
423
|
SChipFilter --> STooltip
|