sellmate-design-system-react 9.0.0-beta.11 → 9.0.0-beta.111
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 +4228 -301
- package/README.md +85 -37
- 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 +67 -0
- package/dist/components/SAccountListBox/index.d.ts +2 -0
- package/dist/components/SActionModal/README.md +6 -4
- package/dist/components/SActionModal/SActionModal.d.ts +16 -6
- package/dist/components/SBadge/README.md +3 -0
- package/dist/components/SBadge/SBadge.d.ts +2 -2
- package/dist/components/SBarChart/README.md +123 -0
- package/dist/components/SBarChart/SBarChart.d.ts +106 -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 +10 -6
- package/dist/components/SBarcodeInput/SBarcodeInput.d.ts +28 -5
- package/dist/components/SButton/README.md +50 -11
- package/dist/components/SButton/SButton.d.ts +30 -7
- package/dist/components/SButton/button.config.d.ts +22 -13
- package/dist/components/SButton/index.d.ts +1 -1
- package/dist/components/SCalendar/README.md +2 -2
- package/dist/components/SCalendar/SCalendar.d.ts +3 -3
- package/dist/components/SCalendarBoard/CalendarDayCard.d.ts +61 -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 +3 -2
- package/dist/components/SCallout/SCallout.d.ts +15 -6
- 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 +52 -0
- package/dist/components/SChatInput/SChatInput.d.ts +127 -0
- package/dist/components/SChatInput/index.d.ts +1 -0
- package/dist/components/SChatMessage/README.md +87 -0
- package/dist/components/SChatMessage/SChatMessage.d.ts +135 -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 +4 -1
- package/dist/components/SCheckbox/SCheckbox.d.ts +11 -3
- package/dist/components/SChip/README.md +29 -4
- package/dist/components/SChip/SChip.d.ts +13 -5
- package/dist/components/SChip/index.d.ts +1 -1
- package/dist/components/SChipFilter/README.md +156 -72
- package/dist/components/SChipFilter/SChipFilter.d.ts +122 -54
- package/dist/components/SChipFilter/index.d.ts +1 -1
- package/dist/components/SChipInput/README.md +10 -5
- package/dist/components/SChipInput/SChipInput.d.ts +57 -7
- package/dist/components/SChipInput/index.d.ts +1 -1
- package/dist/components/SCircleProgress/README.md +6 -3
- package/dist/components/SCircleProgress/SCircleProgress.d.ts +12 -4
- package/dist/components/SConfirmModal/README.md +12 -18
- package/dist/components/SConfirmModal/SConfirmModal.d.ts +55 -16
- 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 +10 -3
- package/dist/components/SDatePicker/SDatePicker.d.ts +52 -7
- package/dist/components/SDateRangePicker/README.md +10 -5
- package/dist/components/SDateRangePicker/SDateRangePicker.d.ts +54 -9
- package/dist/components/SDivider/README.md +7 -0
- package/dist/components/SDivider/SDivider.d.ts +12 -1
- 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 +1 -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 +9 -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 +2 -1
- package/dist/components/SDrawer/SDrawer.d.ts +10 -5
- package/dist/components/SDropdownButton/README.md +16 -6
- package/dist/components/SDropdownButton/SDropdownButton.d.ts +8 -6
- package/dist/components/SDropdownButton/index.d.ts +1 -1
- package/dist/components/SEditor/EditorBody.d.ts +48 -0
- package/dist/components/SEditor/EditorToolbar.d.ts +93 -0
- package/dist/components/SEditor/README.md +207 -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 +126 -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 +3 -2
- package/dist/components/SExpansionItem/SExpansionItem.d.ts +18 -2
- package/dist/components/SExpansionItem/index.d.ts +1 -1
- package/dist/components/SField/README.md +18 -5
- package/dist/components/SField/SField.d.ts +62 -11
- package/dist/components/SField/index.d.ts +1 -1
- package/dist/components/SFilePicker/README.md +8 -6
- package/dist/components/SFilePicker/SFilePicker.d.ts +29 -9
- package/dist/components/SFooter/README.md +31 -8
- package/dist/components/SFooter/SFooter.d.ts +29 -13
- package/dist/components/SFooter/index.d.ts +1 -1
- package/dist/components/SForm/README.md +4 -4
- package/dist/components/SForm/SForm.d.ts +7 -7
- package/dist/components/SGhostButton/README.md +21 -2
- package/dist/components/SGhostButton/SGhostButton.d.ts +23 -5
- package/dist/components/SGnb/README.md +65 -9
- package/dist/components/SGnb/SGnb.d.ts +117 -13
- package/dist/components/SGnb/gnb.config.d.ts +46 -5
- package/dist/components/SGnb/index.d.ts +1 -1
- package/dist/components/SGnbSystem/README.md +190 -0
- package/dist/components/SGnbSystem/SGnbSystem.d.ts +179 -0
- package/dist/components/SGnbSystem/gnbSystem.config.d.ts +120 -0
- package/dist/components/SGnbSystem/index.d.ts +2 -0
- package/dist/components/SGuide/README.md +3 -3
- package/dist/components/SGuide/SGuide.d.ts +8 -5
- package/dist/components/SIcon/README.md +23 -1
- package/dist/components/SIcon/SIcon.d.ts +6 -3
- package/dist/components/SIcon/icons.gen.d.ts +26 -2
- package/dist/components/SImage/README.md +9 -1
- package/dist/components/SImage/SImage.d.ts +11 -8
- package/dist/components/SInput/README.md +13 -7
- package/dist/components/SInput/SInput.d.ts +21 -9
- package/dist/components/SKeyValueTable/README.md +8 -3
- package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +33 -6
- 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 +149 -0
- package/dist/components/SLayout/README.md +6 -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 +132 -0
- package/dist/components/SLineChart/SLineChart.d.ts +115 -0
- package/dist/components/SLineChart/index.d.ts +1 -0
- package/dist/components/SLineChart/lineChart.config.d.ts +94 -0
- package/dist/components/SLinearProgress/README.md +9 -2
- package/dist/components/SLinearProgress/SLinearProgress.d.ts +12 -3
- 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 +2 -2
- package/dist/components/SListItem/SListItem.d.ts +12 -2
- package/dist/components/SListItem/index.d.ts +1 -1
- package/dist/components/SLoadingContainer/README.md +1 -1
- package/dist/components/SLoadingContainer/SLoadingContainer.d.ts +3 -3
- 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 -9
- package/dist/components/SLoadingModal/SLoadingModal.d.ts +10 -8
- 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 +69 -0
- package/dist/components/SMeatballButton/SMeatballButton.d.ts +39 -0
- package/dist/components/SMeatballButton/index.d.ts +1 -0
- package/dist/components/SModal/README.md +20 -10
- package/dist/components/SModal/SModal.d.ts +5 -5
- package/dist/components/SModalContainer/README.md +4 -3
- package/dist/components/SModalContainer/SModalContainer.d.ts +16 -8
- package/dist/components/SNumberInput/README.md +17 -12
- package/dist/components/SNumberInput/SNumberInput.d.ts +53 -11
- package/dist/components/SPage/README.md +68 -5
- package/dist/components/SPage/SPage.d.ts +34 -10
- package/dist/components/SPage/SPageHeader.d.ts +37 -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/SPagination/README.md +11 -1
- package/dist/components/SPagination/SPagination.d.ts +9 -3
- package/dist/components/SPagination/index.d.ts +1 -1
- 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 +1 -1
- package/dist/components/SPopover/SPopover.d.ts +2 -2
- package/dist/components/SPopup/README.md +14 -9
- package/dist/components/SPopup/SPopup.d.ts +15 -12
- package/dist/components/SPopup/index.d.ts +1 -1
- package/dist/components/SPortal/README.md +12 -5
- package/dist/components/SPortal/SPortal.d.ts +11 -9
- package/dist/components/SRadio/README.md +4 -4
- package/dist/components/SRadio/SRadio.d.ts +3 -3
- package/dist/components/SRadio/SRadioGroup.d.ts +3 -3
- package/dist/components/SRadioButton/README.md +11 -2
- package/dist/components/SRadioButton/SRadioButton.d.ts +19 -5
- package/dist/components/SRadioCard/README.md +81 -0
- package/dist/components/SRadioCard/SRadioCard.d.ts +34 -0
- package/dist/components/SRadioCard/SRadioCardGroup.d.ts +38 -0
- package/dist/components/SRadioCard/index.d.ts +2 -0
- package/dist/components/SScrollArea/README.md +14 -0
- package/dist/components/SScrollArea/SScrollArea.d.ts +18 -2
- package/dist/components/SSearchInput/README.md +7 -5
- package/dist/components/SSearchInput/SSearchInput.d.ts +12 -6
- package/dist/components/SSectionHeaderCard/README.md +6 -0
- package/dist/components/SSectionHeaderCard/SSectionHeaderCard.d.ts +19 -0
- package/dist/components/SSectionNav/README.md +32 -0
- package/dist/components/SSectionNav/SSectionNav.d.ts +40 -0
- package/dist/components/SSectionNav/index.d.ts +1 -0
- package/dist/components/SSectionNav/section-nav-scroll.d.ts +27 -0
- package/dist/components/SSelect/README.md +73 -16
- package/dist/components/SSelect/SSelect.d.ts +163 -21
- package/dist/components/SSelect/index.d.ts +1 -1
- package/dist/components/SSelect/select.config.d.ts +65 -6
- package/dist/components/SSkeleton/README.md +67 -0
- package/dist/components/SSkeleton/SSkeleton.d.ts +43 -0
- package/dist/components/SSkeleton/index.d.ts +2 -0
- package/dist/components/SSkeleton/skeleton.config.d.ts +24 -0
- package/dist/components/SSlider/README.md +86 -0
- package/dist/components/SSlider/SSlider.d.ts +149 -0
- package/dist/components/SSlider/index.d.ts +1 -0
- package/dist/components/SSplitter/README.md +2 -2
- package/dist/components/SSplitter/SSplitter.d.ts +7 -3
- package/dist/components/SStepper/README.md +1 -1
- package/dist/components/SStepper/SStepper.d.ts +3 -3
- package/dist/components/SStepper/stepper.config.d.ts +9 -3
- package/dist/components/SSwitch/README.md +14 -2
- package/dist/components/SSwitch/SSwitch.d.ts +3 -5
- package/dist/components/SSystemActionButton/README.md +253 -0
- package/dist/components/SSystemActionButton/SSystemActionButton.d.ts +198 -0
- package/dist/components/SSystemActionButton/index.d.ts +2 -0
- package/dist/components/SSystemActionButton/systemActionButton.config.d.ts +95 -0
- package/dist/components/STable/README.md +120 -87
- package/dist/components/STable/STable.d.ts +380 -51
- package/dist/components/STable/index.d.ts +1 -1
- package/dist/components/STableBar/README.md +2 -1
- package/dist/components/STableBar/STableBar.d.ts +9 -2
- package/dist/components/STabs/README.md +2 -2
- package/dist/components/STabs/STabs.d.ts +5 -6
- package/dist/components/STabs/tabs.config.d.ts +3 -8
- package/dist/components/STag/README.md +18 -0
- package/dist/components/STag/STag.d.ts +4 -3
- package/dist/components/STag/tag.config.d.ts +11 -10
- package/dist/components/STextLink/README.md +7 -1
- package/dist/components/STextLink/STextLink.d.ts +6 -2
- package/dist/components/STextarea/README.md +13 -6
- package/dist/components/STextarea/STextarea.d.ts +51 -8
- package/dist/components/STimePicker/README.md +8 -5
- package/dist/components/STimePicker/STimePicker.d.ts +39 -13
- package/dist/components/STimePicker/TimeListbox.d.ts +21 -0
- package/dist/components/STimePicker/timepicker.config.d.ts +9 -3
- package/dist/components/STimeRangePicker/README.md +9 -6
- package/dist/components/STimeRangePicker/STimeRangePicker.d.ts +43 -10
- package/dist/components/STimeRangePicker/time-range-picker.config.d.ts +2 -1
- package/dist/components/STimeline/README.md +41 -0
- package/dist/components/STimeline/STimeline.d.ts +28 -0
- package/dist/components/STimeline/index.d.ts +1 -0
- package/dist/components/SToast/README.md +5 -5
- package/dist/components/SToast/SToast.d.ts +5 -5
- package/dist/components/SToast/SToastContainer.d.ts +3 -3
- package/dist/components/SToggle/README.md +1 -1
- package/dist/components/SToggle/SToggle.d.ts +2 -2
- package/dist/components/SToggle/index.d.ts +1 -1
- package/dist/components/STooltip/README.md +7 -1
- package/dist/components/STooltip/STooltip.d.ts +2 -2
- package/dist/components/STree/README.md +7 -6
- package/dist/components/STree/STree.d.ts +18 -8
- package/dist/components/STree/STree.examples.d.ts +2 -0
- package/dist/components/STreeTable/README.md +49 -0
- package/dist/components/STreeTable/STreeTable.d.ts +70 -0
- package/dist/components/STreeTable/STreeTable.examples.d.ts +39 -0
- package/dist/components/STreeTable/index.d.ts +1 -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 +26152 -11501
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +28 -0
- package/dist/index.js +26055 -11500
- package/dist/index.js.map +1 -1
- package/dist/lib/autofill.d.ts +3 -5
- package/dist/lib/chart/cartesian.d.ts +54 -0
- package/dist/lib/chart/category-labels.d.ts +37 -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 +42 -0
- package/dist/lib/color.d.ts +1 -1
- package/dist/lib/date.d.ts +16 -2
- 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-anim.d.ts +2 -2
- package/dist/lib/floating-height.d.ts +15 -0
- package/dist/lib/floating-width.d.ts +1 -2
- package/dist/lib/form.d.ts +6 -3
- package/dist/lib/global-overlay.d.ts +5 -0
- package/dist/lib/grid-key-nav.d.ts +10 -0
- package/dist/lib/hover-preview.d.ts +32 -0
- package/dist/lib/inert.d.ts +11 -0
- package/dist/lib/list-box-item.d.ts +16 -0
- package/dist/lib/locale-context.d.ts +26 -0
- package/dist/lib/locale.d.ts +320 -0
- package/dist/lib/mode-listbox.d.ts +10 -0
- package/dist/lib/overlay-scrollbar.d.ts +32 -0
- package/dist/lib/row-metrics.d.ts +61 -0
- package/dist/lib/row-motion.d.ts +56 -0
- package/dist/lib/scrollbar.d.ts +1 -2
- package/dist/lib/story-docs.d.ts +35 -0
- package/dist/lib/tree-row.d.ts +103 -0
- package/dist/llms-full.txt +7537 -806
- package/dist/llms.txt +4277 -330
- 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 +4185 -352
- package/dist/theme.css +796 -58
- 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 +31 -6
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 보낸 파일 칸이 쓰는 값. `component.chatFile` 토큰 한 세트가 여백·면·선·칩을 모두 쥔다.
|
|
3
|
+
*
|
|
4
|
+
* 높이는 고정하지 않고 세로 패딩(`paddingY`)과 내용이 정한다 — 예전에 스케일에 안 떨어져
|
|
5
|
+
* 값으로 두던 높이(56)·타일(28)은 `paddingY` + `icon.wrapper.padding` + 아이콘 크기로 따라온다.
|
|
6
|
+
*/
|
|
7
|
+
export declare const CHAT_FILE_CONFIG: {
|
|
8
|
+
/** 바깥 상자 — 좌우 비대칭 여백·상하 여백·면·선·라운드 */
|
|
9
|
+
readonly box: "pl-(--cmp-chatFile-paddingLeft) pr-(--cmp-chatFile-paddingRight) py-(--cmp-chatFile-paddingY) rounded-(--cmp-chatFile-radius) border-(length:--cmp-chatFile-border-width) border-(--cmp-chatFile-border-color) bg-(--cmp-chatFile-bg-default)";
|
|
10
|
+
/** 아이콘 칩 ↔ 파일명 간격 */
|
|
11
|
+
readonly contentGap: "gap-(--cmp-chatFile-gap)";
|
|
12
|
+
/**
|
|
13
|
+
* 클립 아이콘이 앉는 칩 — 내부 패딩·면·라운드 (높이는 아이콘+패딩이 정한다).
|
|
14
|
+
*
|
|
15
|
+
* hover 면은 상자가 아니라 여기에도 걸린다 — 카드가 어두워질 때 칩은 반대로 밝아져
|
|
16
|
+
* 칩이 배경에 묻히지 않는다. 상자의 hover 를 따라가야 하므로 group-hover 로 받는다.
|
|
17
|
+
*
|
|
18
|
+
* **`--sys-color-bg-frame` 은 임시다.** 시안의 hover 칩 색(`#FFFFFF`)에 대응하는
|
|
19
|
+
* 컴포넌트 토큰이 없다 — `component.chatMessage.chatFile.icon.wrapper.bg` 는 값이 하나뿐이라
|
|
20
|
+
* hover 를 담지 못한다. 상자의 `bg.default` 가 참조하는 것과 같은 시스템 토큰으로 대신 걸어 둔다.
|
|
21
|
+
* 디자인팀에 `icon.wrapper.bg.hover` 를 요청해 나오는 대로 갈아끼운다.
|
|
22
|
+
*/
|
|
23
|
+
readonly tile: "p-(--cmp-chatFile-icon-wrapper-padding) rounded-(--cmp-chatFile-icon-wrapper-radius) bg-(--cmp-chatFile-icon-wrapper-bg) group-hover/chat-file:bg-(--sys-color-bg-frame)";
|
|
24
|
+
/** 칩 안 클립 아이콘 크기 */
|
|
25
|
+
readonly iconSize: "var(--cmp-chatFile-icon-size)";
|
|
26
|
+
/** 파일명 타이포 프리셋 */
|
|
27
|
+
readonly nameTypo: "typo-body-md-bold";
|
|
28
|
+
/** 파일명·부가정보 텍스트색 */
|
|
29
|
+
readonly textColor: "text-(--cmp-chatFile-text-color)";
|
|
30
|
+
/**
|
|
31
|
+
* 눌리는 모양 — 커서·hover 면·포커스 링. 보낸 파일은 언제나 열 수 있으므로 늘 붙는다
|
|
32
|
+
* (`onFileClick` 이 필수다).
|
|
33
|
+
*
|
|
34
|
+
* 상자의 여백·면·선과 따로 두는 이유: 이건 상호작용을 드러내는 값이라 성격이 다르다.
|
|
35
|
+
* 링은 `SExpansionItem`·`SStepper` 와 같은 accent outline.
|
|
36
|
+
*/
|
|
37
|
+
readonly interactive: "cursor-pointer hover:bg-(--cmp-chatFile-bg-hover) focus-visible:outline focus-visible:outline-2 focus-visible:outline-(--sys-color-border-accent)";
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* 바이트 수 → `9.4KB` 표기.
|
|
41
|
+
*
|
|
42
|
+
* **표기를 앱이 아니라 여기서 정하는 이유**: 문자열로 받으면 제품마다 `9.4KB`·`9.4 KB`·
|
|
43
|
+
* `9,626B` 로 갈린다. 같은 파일이 화면마다 다른 크기로 읽히는 것을 막으려면 한 곳에서 만든다.
|
|
44
|
+
*
|
|
45
|
+
* 1024 배수로 올리고, 바이트는 소수점이 뜻이 없어 정수로, 그 위는 한 자리까지 쓴다(시안 표기).
|
|
46
|
+
* 금액·수량의 세 자리 콤마 규칙(AGENTS.md §1-4)과는 별개다 — 용량은 단위가 자리를 대신한다.
|
|
47
|
+
*/
|
|
48
|
+
export declare function formatFileSize(bytes: number): string;
|
|
49
|
+
/** 앱이 준 확장자를 표기 형태로 맞춘다 — 앞의 점을 떼고 소문자로. `'.CSV'` → `'csv'` */
|
|
50
|
+
export declare function normalizeExtension(extension: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* 파일명 → 소문자 확장자. 확장자가 없으면 빈 문자열.
|
|
53
|
+
*
|
|
54
|
+
* 맨 앞의 점은 확장자가 아니다(`.gitignore` 는 이름 전체가 이름이다).
|
|
55
|
+
*/
|
|
56
|
+
export declare function fileExtension(name: string): string;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# SChatInput
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SChatInput
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `value?` | `string` | `''` | 입력값 (제어) |
|
|
12
|
+
| `placeholder?` | `string` | — | 안내 문구. 생략하면 `SLocaleProvider` 로케일의 기본 문구(ko: "메시지를 입력해 주세요...")를 쓴다 |
|
|
13
|
+
| `disabled?` | `boolean` | `false` | 비활성 |
|
|
14
|
+
| `hasAttachments?` | `boolean` | `false` | 보낼 첨부가 쌓여 있는지. 켜면 글이 비어도 전송 버튼이 열린다 — 파일·이미지만 보낼 수 있다. 첨부 목록은 앱이 쥐므로 입력창은 그 유무만 받는다. 첨부를 받는 대화면 쌓인 첨부 수로 켠다. |
|
|
15
|
+
| `attachAccept?` | `string` | — | 파일 선택 창에서 고를 수 있는 형식 (`<input accept>` 와 같다). 예: `'image/*,.pdf'` |
|
|
16
|
+
| `attachMultiple?` | `boolean` | `true` | 파일 선택 창에서 여러 개를 한 번에 고를 수 있는지 |
|
|
17
|
+
| `attachDisabled?` | `boolean` | `false` | 첨부를 잠근다 — 첨부 버튼(파일 선택 창)이 잠기고, **파일 붙여넣기도 받지 않는다**. 입력과 전송은 그대로 둔다. 첨부 수가 상한에 닿았을 때처럼 **더 붙일 수 없는 자리**에 쓴다. 버튼만 잠그면 캡처 이미지를 붙여넣어 상한을 넘길 수 있으므로 붙여넣기도 함께 막는다 — 파일이 든 붙여넣기는 버려지고 (`onPasteFiles` 가 불리지 않는다) 파일 이름이 글로 들어가지도 않는다. 글만 붙여넣는 것은 된다. 왜 잠겼는지는 `attachTooltip` 으로 알린다. |
|
|
18
|
+
| `attachTooltip?` | `string` | — | 첨부 버튼에 마우스를 올리면 뜨는 툴팁. 받을 수 있는 파일 종류·크기나, 잠긴 이유를 적는다. 버튼의 접근성 이름("파일 첨부")은 바뀌지 않는다. |
|
|
19
|
+
| `sendDisabled?` | `boolean` | `false` | 전송을 잠근다 — 전송 버튼과 Enter 전송이 함께 잠기고, 입력과 첨부는 그대로 둔다. 첨부가 올라가는 중처럼 **아직 보낼 수 없지만 적고 붙이는 것은 되는 자리**에 쓴다. 응답을 기다리는 중이면 이것이 아니라 `busy` 를 켠다 — 그쪽은 정지 버튼으로 바뀐다. |
|
|
20
|
+
| `busy?` | `boolean` | `false` | 응답을 기다리는 중인지. 켜면 전송 버튼 자리에 정지 버튼이 서고 Enter 전송이 잠긴다 — 답이 오는 동안 또 보내지 못하게 막는 자리다. |
|
|
21
|
+
| `footerAction?` | `ReactNode` | — | 입력창 아래 보조 액션 슬롯. 없으면 그 줄이 통째로 빠진다. 상담 종료처럼 **대화 자체를 끝내는, 전송과 층이 다른 동작**이 오는 자리다. 무엇을 놓을지는 앱이 정하고, 입력창은 가운데에 세우는 것까지만 한다 — `STextLink` 를 넣는 것이 보통이다. |
|
|
22
|
+
| `maxRows?` | `number` | `DEFAULT_MAX_ROWS` | 입력창이 자랄 수 있는 최대 줄 수. 여기 닿으면 더 자라지 않고 그 안에서 스크롤한다. |
|
|
23
|
+
| `className?` | `string` | — | 바깥 컨테이너 className (안쪽 textarea 가 아니다) |
|
|
24
|
+
| `style?` | `CSSProperties` | — | 바깥 컨테이너 style |
|
|
25
|
+
| `textareaClassName?` | `string` | — | 안쪽 textarea className |
|
|
26
|
+
|
|
27
|
+
#### Events
|
|
28
|
+
|
|
29
|
+
| Event | Type | Description |
|
|
30
|
+
|-------|------|-------------|
|
|
31
|
+
| `onValueChange` | `(value: string) => void` | 값 변경 |
|
|
32
|
+
| `onSend` | `(value: string) => void` | 전송. 전송 버튼을 누르거나 Enter 를 쳤을 때 현재 값을 넘긴다. **값이 비면 전송 버튼이 잠긴다** — 빈 메시지는 보낼 수 없다. 단 `hasAttachments` 가 켜져 있으면 글 없이도 보낼 수 있고, 이때 빈 문자열을 넘긴다. |
|
|
33
|
+
| `onAttachFiles` | `(files: File[]) => void` | 첨부 버튼으로 고른 파일. **주면 입력창 왼쪽에 첨부 버튼이 서고, 누르면 파일 선택 창이 열린다.** 붙여넣기(`onPasteFiles`)와 같은 모양으로 받는다 — 두 길을 같은 함수로 받아 같은 자리에 쌓는다. 파일 선택 창은 입력창이 연다. 앱이 `<input type="file">` 을 따로 두지 않는다. |
|
|
34
|
+
| `onAttach` | `() => void` | 첨부 버튼을 누름. **주면 입력창 왼쪽에 첨부 버튼이 선다** — 파일 선택 창은 열리지 않는다. 서버 파일함 모달처럼 **앱이 직접 고르는 흐름**에만 쓴다. 기기의 파일을 고르는 것이면 `onAttachFiles` 를 준다. 둘 다 주면 `onAttachFiles` 가 쓰이고 이것은 불리지 않는다. |
|
|
35
|
+
| `onPasteFiles` | `(files: File[]) => void` | 붙여넣은 파일. 클립보드에 파일(캡처한 이미지 포함)이 있으면 불린다. **파일이 있으면 글자 붙여넣기를 막는다** — 그대로 두면 파일 이름이 글로 함께 들어간다. 파일이 없는 붙여넣기는 평소대로 글로 들어간다. 받은 파일을 어디에 쌓을지는 앱이 정한다 — 첨부 버튼으로 고른 파일(`onAttachFiles`)과 같은 함수로 받아 같은 자리에 쌓는 것이 보통이다. |
|
|
36
|
+
| `onStop` | `() => void` | 정지. `busy` 일 때 정지 버튼을 누르면 불린다 |
|
|
37
|
+
|
|
38
|
+
## Dependencies
|
|
39
|
+
|
|
40
|
+
### Depends on
|
|
41
|
+
|
|
42
|
+
- [SGhostButton](../SGhostButton)
|
|
43
|
+
- [STextarea](../STextarea)
|
|
44
|
+
|
|
45
|
+
### Graph
|
|
46
|
+
|
|
47
|
+
```mermaid
|
|
48
|
+
graph TD;
|
|
49
|
+
SChatInput --> SGhostButton
|
|
50
|
+
SChatInput --> STextarea
|
|
51
|
+
style SChatInput fill:#f9f,stroke:#333,stroke-width:4px
|
|
52
|
+
```
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode, type TextareaHTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 안쪽 textarea 로 그대로 흘러가는 네이티브 속성 — `SInput`·`STextarea` 와 같은 방식이다.
|
|
4
|
+
* 컴포넌트가 직접 다루는 것만 뺀다.
|
|
5
|
+
*/
|
|
6
|
+
export interface SChatInputProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'onChange' | 'placeholder' | 'disabled' | 'rows' | 'className' | 'style'> {
|
|
7
|
+
/** 입력값 (제어) */
|
|
8
|
+
value?: string;
|
|
9
|
+
/** 값 변경 */
|
|
10
|
+
onValueChange?: (value: string) => void;
|
|
11
|
+
/** 안내 문구. 생략하면 `SLocaleProvider` 로케일의 기본 문구(ko: "메시지를 입력해 주세요...")를 쓴다 */
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
/** 비활성 */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* 전송. 전송 버튼을 누르거나 Enter 를 쳤을 때 현재 값을 넘긴다.
|
|
17
|
+
*
|
|
18
|
+
* **값이 비면 전송 버튼이 잠긴다** — 빈 메시지는 보낼 수 없다. 단 `hasAttachments` 가 켜져
|
|
19
|
+
* 있으면 글 없이도 보낼 수 있고, 이때 빈 문자열을 넘긴다.
|
|
20
|
+
*/
|
|
21
|
+
onSend?: (value: string) => void;
|
|
22
|
+
/**
|
|
23
|
+
* 보낼 첨부가 쌓여 있는지. 켜면 글이 비어도 전송 버튼이 열린다 — 파일·이미지만 보낼 수 있다.
|
|
24
|
+
*
|
|
25
|
+
* 첨부 목록은 앱이 쥐므로 입력창은 그 유무만 받는다. 첨부를 받는 대화면 쌓인 첨부 수로 켠다.
|
|
26
|
+
*/
|
|
27
|
+
hasAttachments?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 첨부 버튼으로 고른 파일. **주면 입력창 왼쪽에 첨부 버튼이 서고, 누르면 파일 선택 창이 열린다.**
|
|
30
|
+
*
|
|
31
|
+
* 붙여넣기(`onPasteFiles`)와 같은 모양으로 받는다 — 두 길을 같은 함수로 받아 같은 자리에 쌓는다.
|
|
32
|
+
* 파일 선택 창은 입력창이 연다. 앱이 `<input type="file">` 을 따로 두지 않는다.
|
|
33
|
+
*/
|
|
34
|
+
onAttachFiles?: (files: File[]) => void;
|
|
35
|
+
/** 파일 선택 창에서 고를 수 있는 형식 (`<input accept>` 와 같다). 예: `'image/*,.pdf'` */
|
|
36
|
+
attachAccept?: string;
|
|
37
|
+
/** 파일 선택 창에서 여러 개를 한 번에 고를 수 있는지 */
|
|
38
|
+
attachMultiple?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* 첨부 버튼을 누름. **주면 입력창 왼쪽에 첨부 버튼이 선다** — 파일 선택 창은 열리지 않는다.
|
|
41
|
+
*
|
|
42
|
+
* 서버 파일함 모달처럼 **앱이 직접 고르는 흐름**에만 쓴다. 기기의 파일을 고르는 것이면
|
|
43
|
+
* `onAttachFiles` 를 준다. 둘 다 주면 `onAttachFiles` 가 쓰이고 이것은 불리지 않는다.
|
|
44
|
+
*/
|
|
45
|
+
onAttach?: () => void;
|
|
46
|
+
/**
|
|
47
|
+
* 첨부를 잠근다 — 첨부 버튼(파일 선택 창)이 잠기고, **파일 붙여넣기도 받지 않는다**. 입력과
|
|
48
|
+
* 전송은 그대로 둔다.
|
|
49
|
+
*
|
|
50
|
+
* 첨부 수가 상한에 닿았을 때처럼 **더 붙일 수 없는 자리**에 쓴다. 버튼만 잠그면 캡처 이미지를
|
|
51
|
+
* 붙여넣어 상한을 넘길 수 있으므로 붙여넣기도 함께 막는다 — 파일이 든 붙여넣기는 버려지고
|
|
52
|
+
* (`onPasteFiles` 가 불리지 않는다) 파일 이름이 글로 들어가지도 않는다. 글만 붙여넣는 것은 된다.
|
|
53
|
+
* 왜 잠겼는지는 `attachTooltip` 으로 알린다.
|
|
54
|
+
*/
|
|
55
|
+
attachDisabled?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* 첨부 버튼에 마우스를 올리면 뜨는 툴팁. 받을 수 있는 파일 종류·크기나, 잠긴 이유를 적는다.
|
|
58
|
+
* 버튼의 접근성 이름("파일 첨부")은 바뀌지 않는다.
|
|
59
|
+
*/
|
|
60
|
+
attachTooltip?: string;
|
|
61
|
+
/**
|
|
62
|
+
* 전송을 잠근다 — 전송 버튼과 Enter 전송이 함께 잠기고, 입력과 첨부는 그대로 둔다.
|
|
63
|
+
*
|
|
64
|
+
* 첨부가 올라가는 중처럼 **아직 보낼 수 없지만 적고 붙이는 것은 되는 자리**에 쓴다. 응답을
|
|
65
|
+
* 기다리는 중이면 이것이 아니라 `busy` 를 켠다 — 그쪽은 정지 버튼으로 바뀐다.
|
|
66
|
+
*/
|
|
67
|
+
sendDisabled?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* 붙여넣은 파일. 클립보드에 파일(캡처한 이미지 포함)이 있으면 불린다.
|
|
70
|
+
*
|
|
71
|
+
* **파일이 있으면 글자 붙여넣기를 막는다** — 그대로 두면 파일 이름이 글로 함께 들어간다.
|
|
72
|
+
* 파일이 없는 붙여넣기는 평소대로 글로 들어간다. 받은 파일을 어디에 쌓을지는 앱이 정한다 —
|
|
73
|
+
* 첨부 버튼으로 고른 파일(`onAttachFiles`)과 같은 함수로 받아 같은 자리에 쌓는 것이 보통이다.
|
|
74
|
+
*/
|
|
75
|
+
onPasteFiles?: (files: File[]) => void;
|
|
76
|
+
/**
|
|
77
|
+
* 응답을 기다리는 중인지. 켜면 전송 버튼 자리에 정지 버튼이 서고 Enter 전송이 잠긴다 —
|
|
78
|
+
* 답이 오는 동안 또 보내지 못하게 막는 자리다.
|
|
79
|
+
*/
|
|
80
|
+
busy?: boolean;
|
|
81
|
+
/** 정지. `busy` 일 때 정지 버튼을 누르면 불린다 */
|
|
82
|
+
onStop?: () => void;
|
|
83
|
+
/**
|
|
84
|
+
* 입력창 아래 보조 액션 슬롯. 없으면 그 줄이 통째로 빠진다.
|
|
85
|
+
*
|
|
86
|
+
* 상담 종료처럼 **대화 자체를 끝내는, 전송과 층이 다른 동작**이 오는 자리다. 무엇을 놓을지는
|
|
87
|
+
* 앱이 정하고, 입력창은 가운데에 세우는 것까지만 한다 — `STextLink` 를 넣는 것이 보통이다.
|
|
88
|
+
*/
|
|
89
|
+
footerAction?: ReactNode;
|
|
90
|
+
/**
|
|
91
|
+
* 입력창이 자랄 수 있는 최대 줄 수. 여기 닿으면 더 자라지 않고 그 안에서 스크롤한다.
|
|
92
|
+
*/
|
|
93
|
+
maxRows?: number;
|
|
94
|
+
/** 바깥 컨테이너 className (안쪽 textarea 가 아니다) */
|
|
95
|
+
className?: string;
|
|
96
|
+
/** 바깥 컨테이너 style */
|
|
97
|
+
style?: CSSProperties;
|
|
98
|
+
/** 안쪽 textarea className */
|
|
99
|
+
textareaClassName?: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* SChatInput — 대화 화면 맨 아래에 서는 입력창.
|
|
103
|
+
*
|
|
104
|
+
* 첨부·입력·전송을 한 줄로 세우고, 필요하면 그 아래 보조 액션(상담 종료 등)을 붙인다.
|
|
105
|
+
* Enter 로 보내고 Shift+Enter 로 줄을 바꾼다 — 한글 조합 중의 Enter 는 보내지 않는다.
|
|
106
|
+
* 첨부 버튼으로 고른 파일은 `onAttachFiles`, 붙여넣은 파일은 `onPasteFiles` 로 넘기고, 첨부가
|
|
107
|
+
* 쌓여 있으면(`hasAttachments`) 글 없이도 보낼 수 있다.
|
|
108
|
+
*
|
|
109
|
+
* **글이 길어지면 입력창이 자란다** — `maxRows` 줄까지 늘어나고, 거기 닿으면 그 안에서
|
|
110
|
+
* 스크롤한다. 상한이 없으면 대화가 화면 밖으로 밀려난다.
|
|
111
|
+
*
|
|
112
|
+
* **응답을 기다리는 동안에는 `busy` 를 켠다** — 전송 버튼이 정지 버튼으로 바뀌고 Enter 전송이
|
|
113
|
+
* 잠겨, 답이 오는 중에 또 보내는 일이 막힌다.
|
|
114
|
+
*
|
|
115
|
+
* **잠금 규칙** — 무엇을 막을지에 따라 하나만 켠다. 함께 켜면 표의 위쪽이 이긴다.
|
|
116
|
+
*
|
|
117
|
+
* | prop | 입력 | 첨부(파일 선택·붙여넣기) | 전송(버튼·Enter) | 정지 | 쓰는 자리 |
|
|
118
|
+
* | --- | --- | --- | --- | --- | --- |
|
|
119
|
+
* | `disabled` | 잠금 | 잠금 | 잠금 | 잠금 | 대화가 끝났다 |
|
|
120
|
+
* | `busy` | 열림 | 그대로 | 정지 버튼으로 바뀜 | 열림 | 응답을 기다린다 |
|
|
121
|
+
* | `sendDisabled` | 열림 | 그대로 | 잠금 | — | 첨부가 올라가는 중이다 |
|
|
122
|
+
* | `attachDisabled` | 열림 | 잠금 | 그대로 | — | 첨부 수가 상한에 닿았다 |
|
|
123
|
+
*
|
|
124
|
+
* 첨부 잠금은 나머지와 따로 움직인다 — `busy`·`sendDisabled` 와 함께 켜도 첨부만 더
|
|
125
|
+
* 잠길 뿐이다. 전송은 이와 별개로 글도 첨부(`hasAttachments`)도 없으면 잠긴다.
|
|
126
|
+
*/
|
|
127
|
+
export declare const SChatInput: import("react").ForwardRefExoticComponent<SChatInputProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SChatInput, type SChatInputProps } from './SChatInput';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# SChatMessage
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SChatMessage
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `direction` | `SChatMessageDirection` | `'incoming'` | 받은 메시지(왼쪽)인지 보낸 메시지(오른쪽)인지. **아바타와 이름 유무도 여기서 갈린다** — 받은 메시지에만 아바타와 `sender` 가 선다. 보낸 메시지는 내가 보냈다는 것이 자리로 이미 드러나 얼굴도 이름도 필요 없다. |
|
|
12
|
+
| `sender?` | `ReactNode` | — | 말풍선 위에 붙는 보낸 사람 이름. 없으면 자리째 빠진다. **받은 메시지에만 쓰인다** — 보낸 메시지에는 넘겨도 그리지 않는다(`direction` 참고). 앱이 데이터를 한 번만 매핑해 방향과 무관하게 넘길 수 있도록 막지 않고 무시한다. |
|
|
13
|
+
| `time?` | `ReactNode` | — | 말풍선 아래에 붙는 시각. 표기는 앱이 정해 문자열로 넘긴다 — 대화 화면의 시각은 `오후 5:52` 처럼 읽는 표기를 쓰므로 카드가 서식을 강제하지 않는다 (AGENTS.md §1-4 예외). |
|
|
14
|
+
| `readStatus?` | `SChatMessageReadStatus` | — | 상대가 읽었는지. 시각 왼쪽에 `읽음`·`안 읽음` 으로 붙고, 주지 않으면 표시하지 않는다. **내가 보낸 메시지에만 붙인다** — 받은 메시지에 읽음 표시를 다는 것은 뜻이 없다. |
|
|
15
|
+
| `avatarSrc?` | `string` | — | 아바타 이미지 경로. 없으면 사람 아이콘 자리표시가 선다. **받은 메시지에만 쓰인다** — 보낸 메시지에는 아바타가 서지 않는다(`direction` 참고). |
|
|
16
|
+
| `avatarAlt?` | `string` | — | 아바타 대체 텍스트 |
|
|
17
|
+
| `showAvatar?` | `boolean` | `true` | 받은 메시지에 아바타 칸을 세울지. 끄면 **칸 자체가 빠져** 말풍선이 행 왼쪽 끝에서 시작한다. 챗봇 답변처럼 **말하는 상대가 하나뿐인 대화**에서 끈다 — 얼굴로 가를 사람이 없으니 칸이 폭만 먹는다. 여러 사람이 말하는 대화에서는 켜 둔다. **한 대화 안에서는 모든 받은 메시지에 같은 값을 준다** — 섞으면 말풍선 시작선이 묶음마다 44px 씩 어긋난다. 끈 대화에서 `continued` 는 이름만 숨긴다(비워 둘 아바타 자리가 없다). 보낸 메시지에는 원래 아바타가 없으므로 영향이 없다. |
|
|
18
|
+
| `continued?` | `boolean` | `false` | 같은 사람이 이어서 말한 묶음인지. 켜면 **아바타와 `sender` 를 그리지 않는다** — 말풍선이 위 묶음과 같은 선에서 시작해 한 사람의 말로 이어 읽힌다. 받은 메시지에서는 아바타 자리를 비워 둔 채 남긴다 — 안 남기면 말풍선이 44px 왼쪽으로 밀려 위 묶음과 어긋난다. 보낸 메시지는 아바타가 없으므로 이름만 숨긴다. `time`·`readStatus` 는 그대로 나온다. 시간이 벌어져 묶음을 나눴어도 얼굴은 한 번만 보이면 되고 시각은 묶음마다 필요하기 때문이다. **얼마나 벌어져야 묶음을 나눌지는 앱이 정한다** — 30분이든 하루든 대화의 성격에 달렸으므로 컴포넌트는 기준을 갖지 않고 스위치만 연다. |
|
|
19
|
+
| `variant?` | `SChatMessageVariant` | `'default'` | 말풍선 종류. `template` 은 미리 등록된 서식으로, `admin` 은 관리자·시스템이 보낸 메시지임을 각각 다른 면으로 드러낸다. 면 색은 토큰이 정하므로 여기서 색을 정하지 않는다. **보낸 메시지(`direction="outgoing"`)에만 쓰인다** — 받은 메시지에는 넘겨도 그리지 않는다. 셋 다 사업자 쪽이 보내는 것이라 받은 쪽에는 뜻이 없다. 앱이 메시지를 한 번만 매핑해 방향과 무관하게 넘길 수 있도록 막지 않고 무시한다. |
|
|
20
|
+
| `actions?` | `ReactNode` | — | 시각 아래에 붙는 동작 슬롯. 없으면 그 줄이 통째로 빠진다. 「상담원 연결」처럼 **이 메시지에 이어서 할 수 있는 동작**이 오는 자리다. 무엇을 놓을지는 앱이 정하고, 메시지는 줄로 세우고 방향에 맞춰 정렬하는 것까지만 한다. 시각과 같은 선에서 시작한다 — 말풍선 끝에서 한 칸 안이다. |
|
|
21
|
+
| `messages?` | `ReactNode[]` | — | 말풍선 목록. **한 항목이 말풍선 하나**가 되어 위에서 아래로 쌓인다. 한 사람이 연달아 말하면 아바타·이름·시각은 한 번만 서고 말풍선만 늘어난다 — 그 묶음이 이 컴포넌트 한 개다. 말풍선 안에는 글뿐 아니라 버튼 같은 요소도 올 수 있다. |
|
|
22
|
+
| `attachments?` | `ReactNode[]` | — | 말풍선 아래에 붙는 파일 목록. **한 항목이 칸 하나**가 되어 위에서 아래로 쌓인다. `SChatFile` 을 넣는 자리다 — 말풍선과 달리 면으로 감싸지 않고 넘긴 것을 그대로 세운다. 파일 칸은 제 면·선·라운드를 이미 갖고 있어 한 번 더 감싸면 칸이 두 겹으로 보인다. **`messages` 대신 여기로 넘긴다.** `messages` 로 넘기면 말풍선 면에 감싸여 그렇게 된다. 아바타·이름·시각·읽음 표시는 글 메시지와 똑같이 이 컴포넌트가 그린다 — 파일을 보낸 것도 대화의 한 줄이므로 행 규칙을 따로 갖지 않는다. |
|
|
23
|
+
|
|
24
|
+
## Types
|
|
25
|
+
|
|
26
|
+
### SChatMessageDirection
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
export type SChatMessageDirection = (typeof CHAT_MESSAGE_DIRECTIONS)[number];
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### SChatMessageReadStatus
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
export type SChatMessageReadStatus = (typeof CHAT_MESSAGE_READ_STATUSES)[number];
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### SChatMessageVariant
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
export type SChatMessageVariant = (typeof CHAT_MESSAGE_VARIANTS)[number];
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### CHAT_MESSAGE_DIRECTIONS
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
/** 메시지가 오는 쪽 — 받은 메시지(incoming)는 왼쪽, 보낸 메시지(outgoing)는 오른쪽에 선다. */
|
|
48
|
+
export const CHAT_MESSAGE_DIRECTIONS = ['incoming', 'outgoing'] as const;
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### CHAT_MESSAGE_READ_STATUSES
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
/** 상대가 내 메시지를 읽었는지. 시각 왼쪽에 붙는다. */
|
|
55
|
+
export const CHAT_MESSAGE_READ_STATUSES = ['read', 'unread'] as const;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### CHAT_MESSAGE_VARIANTS
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
/**
|
|
62
|
+
* 말풍선의 종류.
|
|
63
|
+
* - `default` 사람이 직접 쓴 메시지
|
|
64
|
+
* - `template` 미리 등록된 서식으로 보내진 메시지
|
|
65
|
+
* - `admin` 관리자·시스템이 보낸 메시지
|
|
66
|
+
*
|
|
67
|
+
* **보낸 메시지에서만 면이 갈린다.** 셋 다 사업자 쪽이 보내는 것이라 받은 메시지에는
|
|
68
|
+
* 뜻이 없고, 받은 메시지는 무엇으로 보냈든 같은 면으로 선다.
|
|
69
|
+
*/
|
|
70
|
+
export const CHAT_MESSAGE_VARIANTS = ['default', 'template', 'admin'] as const;
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Dependencies
|
|
74
|
+
|
|
75
|
+
### Depends on
|
|
76
|
+
|
|
77
|
+
- [SIcon](../SIcon)
|
|
78
|
+
- [SImage](../SImage)
|
|
79
|
+
|
|
80
|
+
### Graph
|
|
81
|
+
|
|
82
|
+
```mermaid
|
|
83
|
+
graph TD;
|
|
84
|
+
SChatMessage --> SIcon
|
|
85
|
+
SChatMessage --> SImage
|
|
86
|
+
style SChatMessage fill:#f9f,stroke:#333,stroke-width:4px
|
|
87
|
+
```
|
|
@@ -0,0 +1,135 @@
|
|
|
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
|
+
* 받은 메시지에 아바타 칸을 세울지. 끄면 **칸 자체가 빠져** 말풍선이 행 왼쪽 끝에서 시작한다.
|
|
55
|
+
*
|
|
56
|
+
* 챗봇 답변처럼 **말하는 상대가 하나뿐인 대화**에서 끈다 — 얼굴로 가를 사람이 없으니 칸이
|
|
57
|
+
* 폭만 먹는다. 여러 사람이 말하는 대화에서는 켜 둔다.
|
|
58
|
+
*
|
|
59
|
+
* **한 대화 안에서는 모든 받은 메시지에 같은 값을 준다** — 섞으면 말풍선 시작선이 묶음마다
|
|
60
|
+
* 44px 씩 어긋난다. 끈 대화에서 `continued` 는 이름만 숨긴다(비워 둘 아바타 자리가 없다).
|
|
61
|
+
*
|
|
62
|
+
* 보낸 메시지에는 원래 아바타가 없으므로 영향이 없다.
|
|
63
|
+
*/
|
|
64
|
+
showAvatar?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* 같은 사람이 이어서 말한 묶음인지. 켜면 **아바타와 `sender` 를 그리지 않는다** —
|
|
67
|
+
* 말풍선이 위 묶음과 같은 선에서 시작해 한 사람의 말로 이어 읽힌다.
|
|
68
|
+
*
|
|
69
|
+
* 받은 메시지에서는 아바타 자리를 비워 둔 채 남긴다 — 안 남기면 말풍선이 44px 왼쪽으로 밀려
|
|
70
|
+
* 위 묶음과 어긋난다. 보낸 메시지는 아바타가 없으므로 이름만 숨긴다.
|
|
71
|
+
*
|
|
72
|
+
* `time`·`readStatus` 는 그대로 나온다. 시간이 벌어져 묶음을 나눴어도 얼굴은 한 번만 보이면
|
|
73
|
+
* 되고 시각은 묶음마다 필요하기 때문이다.
|
|
74
|
+
*
|
|
75
|
+
* **얼마나 벌어져야 묶음을 나눌지는 앱이 정한다** — 30분이든 하루든 대화의 성격에 달렸으므로
|
|
76
|
+
* 컴포넌트는 기준을 갖지 않고 스위치만 연다.
|
|
77
|
+
*/
|
|
78
|
+
continued?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* 말풍선 종류. `template` 은 미리 등록된 서식으로, `admin` 은 관리자·시스템이 보낸
|
|
81
|
+
* 메시지임을 각각 다른 면으로 드러낸다. 면 색은 토큰이 정하므로 여기서 색을 정하지 않는다.
|
|
82
|
+
*
|
|
83
|
+
* **보낸 메시지(`direction="outgoing"`)에만 쓰인다** — 받은 메시지에는 넘겨도 그리지 않는다.
|
|
84
|
+
* 셋 다 사업자 쪽이 보내는 것이라 받은 쪽에는 뜻이 없다. 앱이 메시지를 한 번만 매핑해
|
|
85
|
+
* 방향과 무관하게 넘길 수 있도록 막지 않고 무시한다.
|
|
86
|
+
*/
|
|
87
|
+
variant?: SChatMessageVariant;
|
|
88
|
+
/**
|
|
89
|
+
* 시각 아래에 붙는 동작 슬롯. 없으면 그 줄이 통째로 빠진다.
|
|
90
|
+
*
|
|
91
|
+
* 「상담원 연결」처럼 **이 메시지에 이어서 할 수 있는 동작**이 오는 자리다. 무엇을 놓을지는
|
|
92
|
+
* 앱이 정하고, 메시지는 줄로 세우고 방향에 맞춰 정렬하는 것까지만 한다.
|
|
93
|
+
*
|
|
94
|
+
* 시각과 같은 선에서 시작한다 — 말풍선 끝에서 한 칸 안이다.
|
|
95
|
+
*/
|
|
96
|
+
actions?: ReactNode;
|
|
97
|
+
/**
|
|
98
|
+
* 말풍선 목록. **한 항목이 말풍선 하나**가 되어 위에서 아래로 쌓인다.
|
|
99
|
+
*
|
|
100
|
+
* 한 사람이 연달아 말하면 아바타·이름·시각은 한 번만 서고 말풍선만 늘어난다 —
|
|
101
|
+
* 그 묶음이 이 컴포넌트 한 개다. 말풍선 안에는 글뿐 아니라 버튼 같은 요소도 올 수 있다.
|
|
102
|
+
*/
|
|
103
|
+
messages?: ReactNode[];
|
|
104
|
+
/**
|
|
105
|
+
* 말풍선 아래에 붙는 파일 목록. **한 항목이 칸 하나**가 되어 위에서 아래로 쌓인다.
|
|
106
|
+
*
|
|
107
|
+
* `SChatFile` 을 넣는 자리다 — 말풍선과 달리 면으로 감싸지 않고 넘긴 것을 그대로 세운다.
|
|
108
|
+
* 파일 칸은 제 면·선·라운드를 이미 갖고 있어 한 번 더 감싸면 칸이 두 겹으로 보인다.
|
|
109
|
+
*
|
|
110
|
+
* **`messages` 대신 여기로 넘긴다.** `messages` 로 넘기면 말풍선 면에 감싸여 그렇게 된다.
|
|
111
|
+
*
|
|
112
|
+
* 아바타·이름·시각·읽음 표시는 글 메시지와 똑같이 이 컴포넌트가 그린다 — 파일을 보낸 것도
|
|
113
|
+
* 대화의 한 줄이므로 행 규칙을 따로 갖지 않는다.
|
|
114
|
+
*/
|
|
115
|
+
attachments?: ReactNode[];
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* SChatMessage — 대화 화면에서 한 사람이 한 번에 말한 묶음.
|
|
119
|
+
*
|
|
120
|
+
* 아바타·보낸 사람(받은 메시지만)·말풍선·시각을 한 줄로 세운다. **말풍선은 `messages` 항목 수만큼 쌓이고**
|
|
121
|
+
* 아바타·이름·시각은 그 묶음에 한 번만 붙는다 — 연달아 말한 여러 줄이 한 덩어리로 읽힌다.
|
|
122
|
+
*
|
|
123
|
+
* 시각 아래에 동작을 붙여야 하면 `actions` 슬롯에 넣는다 — 시각과 같은 선에서 시작해 방향에
|
|
124
|
+
* 맞춰 정렬된다.
|
|
125
|
+
*
|
|
126
|
+
* 시간이 벌어져 묶음을 나눠야 하는데 말한 사람은 같을 때는 `continued` 를 켠다 — 아바타 자리는
|
|
127
|
+
* 유지한 채 얼굴과 이름만 빠져, 두 묶음이 한 사람의 말로 이어 읽힌다.
|
|
128
|
+
`direction` 하나로 받은 메시지(왼쪽)와
|
|
129
|
+
* 보낸 메시지(오른쪽)가 갈리고, 그에 따라 정렬과 말풍선 색이 함께 뒤집힌다.
|
|
130
|
+
*
|
|
131
|
+
* **말풍선 폭은 내용이 정한다** — 짧은 메시지는 글자만큼만 차지하고, 길면 접힌다. 다만 반대편
|
|
132
|
+
* 끝까지 가지는 않는다: 받은 메시지는 오른쪽, 보낸 메시지는 왼쪽에 여백이 남아 어느 쪽이 말한
|
|
133
|
+
* 것인지가 폭으로도 읽힌다. 대화 폭을 더 좁히려면 이 컴포넌트가 아니라 담는 쪽을 좁힌다.
|
|
134
|
+
*/
|
|
135
|
+
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';
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
| `value?` | `SCheckboxValue` | `false` | 선택 상태. boolean(단일) / 배열(그룹) / null(indeterminate) |
|
|
12
12
|
| `val?` | `unknown` | — | 배열(그룹) 모드에서 이 체크박스의 값 |
|
|
13
13
|
| `label?` | `string` | `''` | 라벨 |
|
|
14
|
+
| `ariaLabel?` | `string` | — | 스크린리더용 접근성 레이블. **`label` 이 없을 때만 준다** — 표의 행 선택처럼 라벨 글자 없이 서는 체크박스는 이것이 없으면 "체크박스" 로만 읽힌다. `label` 이 있으면 그 글자가 이미 이름이 된다. 둘 다 주면 이 값이 화면의 라벨을 덮어써 보이는 글자와 읽히는 이름이 갈린다. |
|
|
14
15
|
| `disabled?` | `boolean` | `false` | 비활성 |
|
|
15
16
|
| `inverse?` | `boolean` | `false` | 어두운 배경용 흰색 스타일 |
|
|
16
17
|
| `className?` | `string` | — | |
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
|
|
21
22
|
| Event | Type | Description |
|
|
22
23
|
|-------|------|-------------|
|
|
23
|
-
| `onValueChange` | `(value: boolean \| unknown[]) => void` | 값 변경
|
|
24
|
+
| `onValueChange` | `(value: boolean \| unknown[]) => void` | 값 변경 |
|
|
24
25
|
|
|
25
26
|
## Types
|
|
26
27
|
|
|
@@ -35,6 +36,7 @@ export type SCheckboxValue = boolean | unknown[] | null;
|
|
|
35
36
|
### Used by
|
|
36
37
|
|
|
37
38
|
- [SKeyValueTable](../SKeyValueTable)
|
|
39
|
+
- [SSelect](../SSelect)
|
|
38
40
|
- [STable](../STable)
|
|
39
41
|
- [STree](../STree)
|
|
40
42
|
|
|
@@ -48,6 +50,7 @@ export type SCheckboxValue = boolean | unknown[] | null;
|
|
|
48
50
|
graph TD;
|
|
49
51
|
SCheckbox --> SIcon
|
|
50
52
|
SKeyValueTable --> SCheckbox
|
|
53
|
+
SSelect --> SCheckbox
|
|
51
54
|
STable --> SCheckbox
|
|
52
55
|
STree --> SCheckbox
|
|
53
56
|
style SCheckbox fill:#f9f,stroke:#333,stroke-width:4px
|
|
@@ -5,10 +5,18 @@ export interface SCheckboxProps {
|
|
|
5
5
|
value?: SCheckboxValue;
|
|
6
6
|
/** 배열(그룹) 모드에서 이 체크박스의 값 */
|
|
7
7
|
val?: unknown;
|
|
8
|
-
/** 값 변경
|
|
8
|
+
/** 값 변경 */
|
|
9
9
|
onValueChange?: (value: boolean | unknown[]) => void;
|
|
10
10
|
/** 라벨 */
|
|
11
11
|
label?: string;
|
|
12
|
+
/**
|
|
13
|
+
* 스크린리더용 접근성 레이블. **`label` 이 없을 때만 준다** — 표의 행 선택처럼 라벨 글자 없이 서는
|
|
14
|
+
* 체크박스는 이것이 없으면 "체크박스" 로만 읽힌다.
|
|
15
|
+
*
|
|
16
|
+
* `label` 이 있으면 그 글자가 이미 이름이 된다. 둘 다 주면 이 값이 화면의 라벨을 덮어써 보이는
|
|
17
|
+
* 글자와 읽히는 이름이 갈린다.
|
|
18
|
+
*/
|
|
19
|
+
ariaLabel?: string;
|
|
12
20
|
/** 비활성 */
|
|
13
21
|
disabled?: boolean;
|
|
14
22
|
/** 어두운 배경용 흰색 스타일 */
|
|
@@ -17,7 +25,7 @@ export interface SCheckboxProps {
|
|
|
17
25
|
style?: CSSProperties;
|
|
18
26
|
}
|
|
19
27
|
/**
|
|
20
|
-
* SCheckbox —
|
|
28
|
+
* SCheckbox — Radix Checkbox 기반.
|
|
21
29
|
* boolean(단일)·배열(그룹, val 필요)·null(indeterminate) 지원, inverse 스타일.
|
|
22
30
|
*/
|
|
23
|
-
export declare function SCheckbox({ value, val, onValueChange, label, disabled, inverse, className, style, }: SCheckboxProps): import("react").JSX.Element;
|
|
31
|
+
export declare function SCheckbox({ value, val, onValueChange, label, ariaLabel, disabled, inverse, className, style, }: SCheckboxProps): import("react").JSX.Element;
|
|
@@ -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` | — | 에러 상태 |
|
|
@@ -23,10 +24,10 @@
|
|
|
23
24
|
|
|
24
25
|
| Event | Type | Description |
|
|
25
26
|
|-------|------|-------------|
|
|
26
|
-
| `onValueChange` | `(value: string) => void` | 편집 완료
|
|
27
|
-
| `onRemove` | `() => void` | 삭제
|
|
28
|
-
| `onFocus` | `() => void` | 편집 진입
|
|
29
|
-
| `onBlur` | `() => void` | 편집 이탈
|
|
27
|
+
| `onValueChange` | `(value: string) => void` | 편집 완료 |
|
|
28
|
+
| `onRemove` | `() => void` | 삭제 |
|
|
29
|
+
| `onFocus` | `() => void` | 편집 진입 |
|
|
30
|
+
| `onBlur` | `() => void` | 편집 이탈 |
|
|
30
31
|
|
|
31
32
|
#### Methods (ref)
|
|
32
33
|
|
|
@@ -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
|