sellmate-design-system-react 9.0.0-beta.9 → 9.0.0-beta.91
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 +4079 -265
- 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 +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 +9 -0
- package/dist/components/SCheckbox/SCheckbox.d.ts +9 -1
- 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 +22 -3
- package/dist/components/SChipInput/SChipInput.d.ts +53 -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 +23 -2
- package/dist/components/SDatePicker/SDatePicker.d.ts +50 -5
- package/dist/components/SDateRangePicker/README.md +23 -4
- package/dist/components/SDateRangePicker/SDateRangePicker.d.ts +52 -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 +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 +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 +39 -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 +38 -5
- package/dist/components/SField/SField.d.ts +59 -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 +32 -5
- package/dist/components/SGhostButton/SGhostButton.d.ts +22 -4
- 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 +18 -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 +12 -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 +27 -0
- package/dist/components/SRadioButton/SRadioButton.d.ts +17 -3
- 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 +19 -4
- package/dist/components/SSearchInput/SSearchInput.d.ts +11 -5
- 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 +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 +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 +142 -20
- package/dist/components/STable/STable.d.ts +312 -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/STimeline/README.md +41 -0
- package/dist/components/STimeline/STimeline.d.ts +27 -0
- package/dist/components/STimeline/index.d.ts +1 -0
- 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 -5
- 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 +32 -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 +22926 -10831
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +25 -0
- package/dist/index.js +22836 -10830
- 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 +11 -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 +8447 -557
- package/dist/llms.txt +4148 -304
- 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 +3663 -244
- package/dist/theme.css +620 -27
- 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 +20 -5
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type CSSProperties, type MouseEvent } from 'react';
|
|
2
2
|
import { type SIconName } from '../SIcon';
|
|
3
3
|
export type SGhostButtonSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
4
|
-
export type SGhostButtonIntent = 'default' | 'danger' | 'action' | 'subAction' | 'inverse';
|
|
4
|
+
export type SGhostButtonIntent = 'default' | 'danger' | 'action' | 'subAction' | 'complete' | 'inverse';
|
|
5
|
+
/** `href` 가 없으면 `<button>`, 있으면 `<a>` 로 그린다 */
|
|
6
|
+
type GhostButtonElement = HTMLButtonElement | HTMLAnchorElement;
|
|
5
7
|
export interface SGhostButtonProps {
|
|
6
8
|
/** 표시할 아이콘명 (필수) */
|
|
7
9
|
icon: SIconName;
|
|
@@ -19,8 +21,17 @@ export interface SGhostButtonProps {
|
|
|
19
21
|
tooltipText?: string;
|
|
20
22
|
/** 비활성 */
|
|
21
23
|
disabled?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
+
/**
|
|
25
|
+
* 이동할 주소. **주면 `<button>` 대신 `<a>` 로 그린다** — 가운데 클릭·⌘클릭·주소 복사가 링크처럼 듣는다.
|
|
26
|
+
*
|
|
27
|
+
* 눌러서 다른 화면·문서로 가는 버튼이면 `onClick` 에서 `location` 을 바꾸지 말고 이것을 준다.
|
|
28
|
+
* 비활성이면 주소를 떼어 눌러도 가지 않는다.
|
|
29
|
+
*/
|
|
30
|
+
href?: string;
|
|
31
|
+
/** `href` 를 여는 곳. `'_blank'` 면 `rel="noopener noreferrer"` 를 함께 붙인다 */
|
|
32
|
+
target?: string;
|
|
33
|
+
/** 클릭 (sdClick). `href` 와 함께 주면 이동 전에 불린다 */
|
|
34
|
+
onClick?: (e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
24
35
|
/** tooltip anchor wrapper 클래스. tooltipText가 있을 때 위치 조정용으로 사용합니다. */
|
|
25
36
|
anchorClassName?: string;
|
|
26
37
|
/** tooltip anchor wrapper 스타일. tooltipText가 있을 때 위치 조정용으로 사용합니다. */
|
|
@@ -31,5 +42,12 @@ export interface SGhostButtonProps {
|
|
|
31
42
|
/**
|
|
32
43
|
* SGhostButton — sd-ghost-button 포팅. 아이콘 전용 투명 버튼.
|
|
33
44
|
* hover 시 intent 색 오버레이(5%), focus-visible 링, 옵션 툴팁(회색 STag).
|
|
45
|
+
*
|
|
46
|
+
* `href` 를 주면 같은 모양의 링크(`<a>`)로 그린다.
|
|
47
|
+
*
|
|
48
|
+
* ref 는 버튼 요소로 그대로 간다 — 이 버튼에 붙여 띄우는 층(SGnb 런처의 서비스 목록 등)이
|
|
49
|
+
* 버튼을 앵커로 삼아야 한다. 툴팁을 두른 형태에서도 앵커는 래퍼가 아니라 버튼이다.
|
|
50
|
+
* 링크로 그리면 ref 는 `<a>` 로 간다.
|
|
34
51
|
*/
|
|
35
|
-
export declare
|
|
52
|
+
export declare const SGhostButton: import("react").ForwardRefExoticComponent<SGhostButtonProps & import("react").RefAttributes<GhostButtonElement>>;
|
|
53
|
+
export {};
|
|
@@ -9,16 +9,17 @@
|
|
|
9
9
|
| Prop | Type | Default | Description |
|
|
10
10
|
|------|------|---------|-------------|
|
|
11
11
|
| `type?` | `SGnbType` | — | 메뉴 스타일: box(라운드) / belt(풀폭 행). 미지정 시 SLayout 의 type 을 따른다. |
|
|
12
|
-
| `header?` | `SGnbHeader` | — | 상단바 구조: fix(GNB 폭 고정) / full(레이아웃 전폭). 미지정 시 SLayout 의 header 를 따른다. 단,
|
|
12
|
+
| `header?` | `SGnbHeader` | — | 상단바 구조: fix(GNB 폭 고정) / full(레이아웃 전폭). 미지정 시 SLayout 의 header 를 따른다. 단, showRail 이고 레일에 children 없는 아이템이 있으면 메뉴 폭이 출렁이므로 full 로 강제된다. |
|
|
13
13
|
| `color?` | `SGnbColor` | `'light'` | 색상 테마: light / dark |
|
|
14
|
-
| `items` | `SGnbMenuItem[]` | — | 메뉴 트리 (depth1 → depth2 → depth3).
|
|
15
|
-
| `
|
|
14
|
+
| `items` | `SGnbMenuItem[]` | — | 메뉴 트리 (depth1 → depth2 → depth3). showRail 이면 첫 depth 가 레일이 되고 그 children 이 depth1 이 된다. |
|
|
15
|
+
| `showRail?` | `boolean` | — | 좌측 레일 사용 여부. 켜면 items 의 첫 depth 가 아이콘+라벨 버튼의 세로 레일로 서고, 선택된 레일 아이템의 children 이 오른쪽 메뉴 패널에 깔린다. 미지정 시 SLayout 의 showRail 을 따른다. children 없는 레일 아이템이 활성이면 메뉴 패널은 렌더되지 않고 레일만 남는다. |
|
|
16
16
|
| `value?` | `string` | `''` | 현재 선택된 아이템 value |
|
|
17
17
|
| `folded?` | `boolean` | — | 접힘(레일) 상태. 미지정 시 SLayout 의 folded 를 따른다. |
|
|
18
|
-
| `
|
|
18
|
+
| `launcher?` | `SGnbLauncher` | — | 앱런처(그리드) 버튼. 미지정 시 런처 버튼을 렌더하지 않는다. 접힘 레일(fix)에는 폴드 버튼만 남으므로 표시되지 않는다. |
|
|
19
|
+
| `logo?` | `ReactNode` | — | 상단바 로고 영역 (slot). - `header="fix"` : 런처와 폴드 버튼 사이의 남은 폭이 로고 칸이다. `SLogo size="auto"` 를 넣으면 그 폭을 채운다(메뉴 폭을 바꿔도 따라온다). 넘치는 로고는 잘린다. - `header="full"` : 폭이 140px 로 고정된다. 여기서는 `size="auto"` 를 쓰지 않는다 — 높이(`size`)로 주고 140px 안에 들어가는 크기를 고른다. |
|
|
19
20
|
| `topContent?` | `ReactNode` | — | 상단바 로고 오른쪽 슬롯 (검색·액션 등). 로고와 16px 띄고 남는 폭을 모두 차지하므로 안에서 자유롭게 정렬한다. 상단바가 전폭인 header="full" 에서만 렌더된다 (fix 는 상단바가 좁은 GNB 컬럼 안이라 놓을 자리가 없다). |
|
|
20
|
-
| `railTop?` | `ReactNode` | — | 레일 상단 고정 슬롯. 레일 아이템이 많아 넘치면 아이템 목록(ul)만 스크롤되고 이 슬롯은 레일 상단(상단바 바로 아래)에 붙어 고정된다.
|
|
21
|
-
| `railFooter?` | `ReactNode` | — | 레일 하단 고정 슬롯. 레일 아이템이 많아 넘치면 아이템 목록(ul)만 스크롤되고 이 슬롯은 레일 하단에 붙어 고정된다.
|
|
21
|
+
| `railTop?` | `ReactNode` | — | 레일 상단 고정 슬롯. 레일 아이템이 많아 넘치면 아이템 목록(ul)만 스크롤되고 이 슬롯은 레일 상단(상단바 바로 아래)에 붙어 고정된다. showRail 일 때만 렌더된다. |
|
|
22
|
+
| `railFooter?` | `ReactNode` | — | 레일 하단 고정 슬롯. 레일 아이템이 많아 넘치면 아이템 목록(ul)만 스크롤되고 이 슬롯은 레일 하단에 붙어 고정된다. showRail 일 때만 렌더된다. |
|
|
22
23
|
| `menuTop?` | `ReactNode` | — | 메뉴 상단 고정 슬롯. 메뉴 아이템이 많아 넘치면 메뉴 목록(ul)만 스크롤되고 이 슬롯은 메뉴 상단에 붙어 고정된다. 메뉴가 렌더될 때만(showMenu) 나타난다. |
|
|
23
24
|
| `menuFooter?` | `ReactNode` | — | 메뉴 하단 고정 슬롯. 메뉴 아이템이 많아 넘치면 메뉴 목록(ul)만 스크롤되고 이 슬롯은 메뉴 하단에 붙어 고정된다. 메뉴가 렌더될 때만(showMenu) 나타난다. |
|
|
24
25
|
| `foldedTop?` | `ReactNode` | — | 접힘(fix 레일) 상단 고정 슬롯. 접으면 본문이 빠져나가며 rail/menu top 도 사라지므로, 48px 폴드 레일 상단(상단바 바로 아래)에 붙는 별도 슬롯이다. header="fix" 로 접혔을 때만 나타난다. |
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
| `resizable?` | `boolean` | `false` | 메뉴 폭을 드래그로 조절할 수 있게 한다. 레일 폭은 고정이고 **메뉴 컬럼만** 늘고 준다. 조절선은 GNB 컬럼의 오른쪽 경계 전체다 — fix 는 상단바 높이까지, full 은 상단바가 전폭이라 본문 높이까지. 접혀 있거나 깔 메뉴가 없으면(레일 리프가 활성) 조절선이 나오지 않는다. |
|
|
27
28
|
| `menuWidth?` | `number` | — | 메뉴 폭(px). 주면 controlled — onMenuWidthChange 로 직접 갱신해야 움직인다 |
|
|
28
29
|
| `defaultMenuWidth?` | `number` | — | 메뉴 초기 폭(px). uncontrolled |
|
|
30
|
+
| `system?` | `ReactNode` | — | system 슬롯(`SGnbSystem`). 놓이는 자리와 형태는 `header` 가 정한다. - fix : GNB 맨 아래 세로 판. 펼치면 메뉴 컬럼 바닥에, 접히면 `foldedFooter` 아래 레일 바닥에 여백 없이 붙는다. showRail 에서 메뉴가 없는 레일 아이템이 활성이면 메뉴 컬럼째 사라지므로 이 슬롯도 함께 빠진다. - full: 전폭 상단바 오른쪽 끝에 가로 한 줄로 선다. 상단바는 접어도 남으므로 조각들도 늘 남는다. 색·형태는 GNB 가 내려주므로 SGnbSystem 에 다시 넘기지 않아도 된다. |
|
|
29
31
|
| `ariaLabel?` | `string` | `'global navigation'` | 메뉴 landmark(nav) 의 접근성 레이블. 한 화면에 nav 가 여럿일 때 구분한다. |
|
|
30
32
|
|
|
31
33
|
#### Events
|
|
@@ -34,17 +36,113 @@
|
|
|
34
36
|
|-------|------|-------------|
|
|
35
37
|
| `onValueChange` | `(value: string) => void` | 선택 변경 (sdUpdate) |
|
|
36
38
|
| `onRailChange` | `(value: string) => void` | 레일 선택 변경. 레일 아이템을 눌러 패널이 바뀔 때 알린다(선택 상태는 SGnb 가 자체 관리). |
|
|
37
|
-
| `
|
|
38
|
-
| `onLauncherClick` | `() => void` | 앱런처(그리드) 버튼 클릭. 미지정 시 런처 버튼을 렌더하지 않는다. 접힘 레일(fix)에는 폴드 버튼만 남으므로 표시되지 않는다. |
|
|
39
|
+
| `onFoldedChange` | `(folded: boolean) => void` | 접힘 토글 (sdFoldChange) |
|
|
39
40
|
| `onMenuWidthChange` | `(width: number) => void` | 메뉴 폭이 확정될 때(드래그를 놓거나 방향키 조작). 드래그하는 동안에는 오지 않는다 |
|
|
40
41
|
|
|
42
|
+
## Types
|
|
43
|
+
|
|
44
|
+
### SGnbType
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
/** 메뉴 스타일: box = 라운드/좁은 들여쓰기, belt = 풀폭 행/넓은 들여쓰기 */
|
|
48
|
+
export type SGnbType = 'box' | 'belt';
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### SGnbHeader
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
/** 상단바 구조: fix = GNB 폭에 고정, full = 레이아웃 전폭 */
|
|
55
|
+
export type SGnbHeader = 'fix' | 'full';
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### SGnbColor
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
/** 색상(테마): light / dark */
|
|
62
|
+
export type SGnbColor = 'light' | 'dark';
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### SGnbMenuItem
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
/** GNB 메뉴 아이템 (재귀 트리). depth1 → depth2 → depth3. */
|
|
69
|
+
export interface SGnbMenuItem {
|
|
70
|
+
/** 표시 텍스트 */
|
|
71
|
+
label: string;
|
|
72
|
+
/** 고유 식별값 (선택 상태 비교 기준) */
|
|
73
|
+
value: string;
|
|
74
|
+
/** depth1 전용 아이콘명 */
|
|
75
|
+
icon?: SIconName;
|
|
76
|
+
/** 우측 Tag 뱃지 텍스트 */
|
|
77
|
+
tag?: string;
|
|
78
|
+
/** 뱃지 색. 미지정 시 blue. */
|
|
79
|
+
tagColor?: STagColor;
|
|
80
|
+
/** 비활성 여부 */
|
|
81
|
+
disabled?: boolean;
|
|
82
|
+
/** 하위 아이템 (있으면 펼침/접힘 대상) */
|
|
83
|
+
children?: SGnbMenuItem[];
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### SGnbLauncher
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
/** 앱런처(그리드) 버튼 */
|
|
91
|
+
export interface SGnbLauncher {
|
|
92
|
+
/**
|
|
93
|
+
* 누르면 뜨는 서비스 목록(`SLauncherListBox`). 옮겨 갈 수 있는 서비스가 무엇인지는
|
|
94
|
+
* 서비스마다 다르지만 **뜨는 자리는 늘 같아야 하므로**, 방향·앵커·여닫힘(바깥 클릭·ESC 포함)과
|
|
95
|
+
* 배경·라운드·그림자는 컴포넌트가 쥐고 앱은 목록만 준다 — 런처 버튼 아래로, 버튼 왼쪽 끝에 맞춰 뜬다.
|
|
96
|
+
*
|
|
97
|
+
* 비면 목록이 뜨지 않는다 — 아직 목록을 못 받은 화면에서 빈 흰 상자가 뜨는 대신
|
|
98
|
+
* 버튼만 남고 `onClick` 은 그대로 온다.
|
|
99
|
+
*/
|
|
100
|
+
items?: SLauncherListBoxItem[];
|
|
101
|
+
/** 런처 **버튼**을 누름. 목록은 어차피 열리므로, 여는 것 말고 따로 할 일이 있을 때만 준다 */
|
|
102
|
+
onClick?: () => void;
|
|
103
|
+
/**
|
|
104
|
+
* 목록에서 **서비스를 고름**. 고른 서비스 키가 온다.
|
|
105
|
+
*
|
|
106
|
+
* **여기서 화면을 옮기지 않는다** — 줄은 링크라 브라우저가 `href` 를 새 탭으로 이미 연다.
|
|
107
|
+
* 고른 것을 앱이 알아야 할 때만(기록 등) 준다. 고르면 목록은 할 일을 끝낸 것이라 스스로
|
|
108
|
+
* 닫힌다(`onOpenChange(false)` 도 함께 온다).
|
|
109
|
+
*/
|
|
110
|
+
onSelect?: (service: SLauncherService) => void;
|
|
111
|
+
/**
|
|
112
|
+
* 셀메이트 콘솔 주소. 목록 아래에 **늘 서는** "셀메이트 콘솔로 이동" 글자 링크가 누르면 이 주소를
|
|
113
|
+
* 새 탭에서 연다(`SLauncherListBox` 의 `consoleHref`). **필수다** — 콘솔로 가는 길은 어느
|
|
114
|
+
* 서비스의 런처에나 있어야 한다. 목록(`items`)이 비면 목록째 뜨지 않으므로 이 링크도 뜨지 않는다.
|
|
115
|
+
*/
|
|
116
|
+
consoleHref: string;
|
|
117
|
+
/**
|
|
118
|
+
* 콘솔 링크를 누름. `onSelect` 와 같이 **화면을 옮기지 않는다** — 컴포넌트가 새 탭으로 이미 연다.
|
|
119
|
+
* 누르면 목록은 스스로 닫힌다.
|
|
120
|
+
*/
|
|
121
|
+
onConsoleClick?: () => void;
|
|
122
|
+
/**
|
|
123
|
+
* 목록이 열리고 닫힐 때. 여닫는 것은 런처 버튼이 스스로 하므로 **그 사실을 알아야 할 때만** 준다
|
|
124
|
+
* (연 김에 목록을 다시 불러오거나, 열려 있는 동안 다른 층을 접어 두는 화면).
|
|
125
|
+
*
|
|
126
|
+
* 앱이 누르지 않은 닫힘도 온다: `header="fix"` 에서 GNB 를 접으면 런처 버튼이 사라지므로
|
|
127
|
+
* 목록이 닫히고 `false` 가 온다.
|
|
128
|
+
*/
|
|
129
|
+
onOpenChange?: (open: boolean) => void;
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
41
133
|
## Dependencies
|
|
42
134
|
|
|
135
|
+
### Used by
|
|
136
|
+
|
|
137
|
+
- [SGnbSystem](../SGnbSystem)
|
|
138
|
+
|
|
43
139
|
### Depends on
|
|
44
140
|
|
|
45
141
|
- [SGhostButton](../SGhostButton)
|
|
46
142
|
- [SIcon](../SIcon)
|
|
143
|
+
- [SLauncherListBox](../SLauncherListBox)
|
|
47
144
|
- [SLayout](../SLayout)
|
|
145
|
+
- [SPortal](../SPortal)
|
|
48
146
|
- [STag](../STag)
|
|
49
147
|
|
|
50
148
|
### Graph
|
|
@@ -53,7 +151,10 @@
|
|
|
53
151
|
graph TD;
|
|
54
152
|
SGnb --> SGhostButton
|
|
55
153
|
SGnb --> SIcon
|
|
154
|
+
SGnb --> SLauncherListBox
|
|
56
155
|
SGnb --> SLayout
|
|
156
|
+
SGnb --> SPortal
|
|
57
157
|
SGnb --> STag
|
|
158
|
+
SGnbSystem --> SGnb
|
|
58
159
|
style SGnb fill:#f9f,stroke:#333,stroke-width:4px
|
|
59
160
|
```
|
|
@@ -1,23 +1,105 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import { type SLauncherListBoxItem, type SLauncherService } from '../SLauncherListBox';
|
|
3
|
+
import type { SGnbSystemPlacement } from '../SGnbSystem/gnbSystem.config';
|
|
2
4
|
import { type SGnbType, type SGnbHeader, type SGnbColor, type SGnbMenuItem } from './gnb.config';
|
|
5
|
+
/**
|
|
6
|
+
* SGnb 가 `system` 슬롯에 내려주는 값. 슬롯에 놓인 SGnbSystem 이 이걸 읽어
|
|
7
|
+
* 색과 형태(가로/세로 · 펼침/접힘)를 GNB 에 맞춘다 — 앱이 같은 값을 두 번 넘기지 않게 한다.
|
|
8
|
+
*
|
|
9
|
+
* 슬롯이 어디에 놓이는지는 header 가 정한다.
|
|
10
|
+
* - fix : 메뉴 컬럼 바닥 · 접힘 레일 바닥 → `placement: 'panel'` (세로 판)
|
|
11
|
+
* - full: 전폭 상단바 오른쪽 끝 → `placement: 'top'` (판 없이 가로 한 줄)
|
|
12
|
+
*
|
|
13
|
+
* `folded` 는 GNB 의 접힘 상태가 아니라 **그 자리가 접힌 레일인지**다. panel 은 두 곳에 놓이고
|
|
14
|
+
* (메뉴 컬럼 바닥 · 접힘 레일 바닥) 각 자리가 자기 형태를 못 박으므로, 접는 동안 아직 미끄러져
|
|
15
|
+
* 나가는 중인 메뉴 컬럼의 패널이 min 형태로 튀지 않는다.
|
|
16
|
+
*
|
|
17
|
+
* 그래서 fix 로 접혀 있는 동안 슬롯 내용은 **두 자리에 함께 마운트된다** — 미끄러져 나간 메뉴
|
|
18
|
+
* 컬럼(잔상)과 레일 바닥(실물). `active` 가 그 둘을 가른다.
|
|
19
|
+
*/
|
|
20
|
+
export interface SGnbSystemContextValue {
|
|
21
|
+
/** GNB 색 */
|
|
22
|
+
color: SGnbColor;
|
|
23
|
+
/** 이 자리가 접힌(48px) 레일인지. `placement: 'top'` 에서는 뜻이 없다 */
|
|
24
|
+
folded: boolean;
|
|
25
|
+
/** 이 자리가 세로 판인지 전폭 상단바인지 */
|
|
26
|
+
placement: SGnbSystemPlacement;
|
|
27
|
+
/**
|
|
28
|
+
* 이 자리가 지금 화면에 살아 있는 자리인가. 접힌 GNB 의 메뉴 컬럼처럼 밖으로 미끄러져 나가
|
|
29
|
+
* 잔상으로만 남는 자리는 `false` 다.
|
|
30
|
+
*
|
|
31
|
+
* 잔상에서도 계정 리스트박스 같은 **떠 있는 층은 함께 숨지 않는다** — SPortal 로 문서 최상단에
|
|
32
|
+
* 그려져 컬럼의 `visibility: hidden` 이 닿지 않기 때문이다. 그래서 잔상이 된 자리는 열어 둔
|
|
33
|
+
* 것을 스스로 닫아야 하고, 그 신호가 이 값이다.
|
|
34
|
+
*/
|
|
35
|
+
active: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* 이 자리가 메뉴 기본 폭(GNB_MENU_WIDTH)보다 좁은가 — `resizable` 로 줄인 메뉴 컬럼이 그렇다.
|
|
38
|
+
* 좁아진 판에서는 알림 개수를 적을 가로가 모자라 개수 대신 점 배지가 붙는다.
|
|
39
|
+
* 없으면 좁지 않은 것으로 본다(접힘 레일·상단바는 자기 규칙을 따르므로 이 값과 무관하다).
|
|
40
|
+
*/
|
|
41
|
+
narrow?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export declare const SGnbSystemContext: import("react").Context<SGnbSystemContextValue | null>;
|
|
44
|
+
/** 앱런처(그리드) 버튼 */
|
|
45
|
+
export interface SGnbLauncher {
|
|
46
|
+
/**
|
|
47
|
+
* 누르면 뜨는 서비스 목록(`SLauncherListBox`). 옮겨 갈 수 있는 서비스가 무엇인지는
|
|
48
|
+
* 서비스마다 다르지만 **뜨는 자리는 늘 같아야 하므로**, 방향·앵커·여닫힘(바깥 클릭·ESC 포함)과
|
|
49
|
+
* 배경·라운드·그림자는 컴포넌트가 쥐고 앱은 목록만 준다 — 런처 버튼 아래로, 버튼 왼쪽 끝에 맞춰 뜬다.
|
|
50
|
+
*
|
|
51
|
+
* 비면 목록이 뜨지 않는다 — 아직 목록을 못 받은 화면에서 빈 흰 상자가 뜨는 대신
|
|
52
|
+
* 버튼만 남고 `onClick` 은 그대로 온다.
|
|
53
|
+
*/
|
|
54
|
+
items?: SLauncherListBoxItem[];
|
|
55
|
+
/** 런처 **버튼**을 누름. 목록은 어차피 열리므로, 여는 것 말고 따로 할 일이 있을 때만 준다 */
|
|
56
|
+
onClick?: () => void;
|
|
57
|
+
/**
|
|
58
|
+
* 목록에서 **서비스를 고름**. 고른 서비스 키가 온다.
|
|
59
|
+
*
|
|
60
|
+
* **여기서 화면을 옮기지 않는다** — 줄은 링크라 브라우저가 `href` 를 새 탭으로 이미 연다.
|
|
61
|
+
* 고른 것을 앱이 알아야 할 때만(기록 등) 준다. 고르면 목록은 할 일을 끝낸 것이라 스스로
|
|
62
|
+
* 닫힌다(`onOpenChange(false)` 도 함께 온다).
|
|
63
|
+
*/
|
|
64
|
+
onSelect?: (service: SLauncherService) => void;
|
|
65
|
+
/**
|
|
66
|
+
* 셀메이트 콘솔 주소. 목록 아래에 **늘 서는** "셀메이트 콘솔로 이동" 글자 링크가 누르면 이 주소를
|
|
67
|
+
* 새 탭에서 연다(`SLauncherListBox` 의 `consoleHref`). **필수다** — 콘솔로 가는 길은 어느
|
|
68
|
+
* 서비스의 런처에나 있어야 한다. 목록(`items`)이 비면 목록째 뜨지 않으므로 이 링크도 뜨지 않는다.
|
|
69
|
+
*/
|
|
70
|
+
consoleHref: string;
|
|
71
|
+
/**
|
|
72
|
+
* 콘솔 링크를 누름. `onSelect` 와 같이 **화면을 옮기지 않는다** — 컴포넌트가 새 탭으로 이미 연다.
|
|
73
|
+
* 누르면 목록은 스스로 닫힌다.
|
|
74
|
+
*/
|
|
75
|
+
onConsoleClick?: () => void;
|
|
76
|
+
/**
|
|
77
|
+
* 목록이 열리고 닫힐 때. 여닫는 것은 런처 버튼이 스스로 하므로 **그 사실을 알아야 할 때만** 준다
|
|
78
|
+
* (연 김에 목록을 다시 불러오거나, 열려 있는 동안 다른 층을 접어 두는 화면).
|
|
79
|
+
*
|
|
80
|
+
* 앱이 누르지 않은 닫힘도 온다: `header="fix"` 에서 GNB 를 접으면 런처 버튼이 사라지므로
|
|
81
|
+
* 목록이 닫히고 `false` 가 온다.
|
|
82
|
+
*/
|
|
83
|
+
onOpenChange?: (open: boolean) => void;
|
|
84
|
+
}
|
|
3
85
|
export interface SGnbProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
4
86
|
/** 메뉴 스타일: box(라운드) / belt(풀폭 행). 미지정 시 SLayout 의 type 을 따른다. */
|
|
5
87
|
type?: SGnbType;
|
|
6
88
|
/**
|
|
7
89
|
* 상단바 구조: fix(GNB 폭 고정) / full(레이아웃 전폭). 미지정 시 SLayout 의 header 를 따른다.
|
|
8
|
-
* 단,
|
|
90
|
+
* 단, showRail 이고 레일에 children 없는 아이템이 있으면 메뉴 폭이 출렁이므로 full 로 강제된다.
|
|
9
91
|
*/
|
|
10
92
|
header?: SGnbHeader;
|
|
11
93
|
/** 색상 테마: light / dark */
|
|
12
94
|
color?: SGnbColor;
|
|
13
|
-
/** 메뉴 트리 (depth1 → depth2 → depth3).
|
|
95
|
+
/** 메뉴 트리 (depth1 → depth2 → depth3). showRail 이면 첫 depth 가 레일이 되고 그 children 이 depth1 이 된다. */
|
|
14
96
|
items: SGnbMenuItem[];
|
|
15
97
|
/**
|
|
16
98
|
* 좌측 레일 사용 여부. 켜면 items 의 첫 depth 가 아이콘+라벨 버튼의 세로 레일로 서고,
|
|
17
|
-
* 선택된 레일 아이템의 children 이 오른쪽 메뉴 패널에 깔린다. 미지정 시 SLayout 의
|
|
99
|
+
* 선택된 레일 아이템의 children 이 오른쪽 메뉴 패널에 깔린다. 미지정 시 SLayout 의 showRail 을 따른다.
|
|
18
100
|
* children 없는 레일 아이템이 활성이면 메뉴 패널은 렌더되지 않고 레일만 남는다.
|
|
19
101
|
*/
|
|
20
|
-
|
|
102
|
+
showRail?: boolean;
|
|
21
103
|
/** 현재 선택된 아이템 value */
|
|
22
104
|
value?: string;
|
|
23
105
|
/** 선택 변경 (sdUpdate) */
|
|
@@ -27,10 +109,19 @@ export interface SGnbProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'>
|
|
|
27
109
|
/** 접힘(레일) 상태. 미지정 시 SLayout 의 folded 를 따른다. */
|
|
28
110
|
folded?: boolean;
|
|
29
111
|
/** 접힘 토글 (sdFoldChange) */
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
|
|
112
|
+
onFoldedChange?: (folded: boolean) => void;
|
|
113
|
+
/**
|
|
114
|
+
* 앱런처(그리드) 버튼. 미지정 시 런처 버튼을 렌더하지 않는다.
|
|
115
|
+
* 접힘 레일(fix)에는 폴드 버튼만 남으므로 표시되지 않는다.
|
|
116
|
+
*/
|
|
117
|
+
launcher?: SGnbLauncher;
|
|
118
|
+
/**
|
|
119
|
+
* 상단바 로고 영역 (slot).
|
|
120
|
+
* - `header="fix"` : 런처와 폴드 버튼 사이의 남은 폭이 로고 칸이다. `SLogo size="auto"` 를 넣으면
|
|
121
|
+
* 그 폭을 채운다(메뉴 폭을 바꿔도 따라온다). 넘치는 로고는 잘린다.
|
|
122
|
+
* - `header="full"` : 폭이 140px 로 고정된다. 여기서는 `size="auto"` 를 쓰지 않는다 — 높이(`size`)로
|
|
123
|
+
* 주고 140px 안에 들어가는 크기를 고른다.
|
|
124
|
+
*/
|
|
34
125
|
logo?: ReactNode;
|
|
35
126
|
/**
|
|
36
127
|
* 상단바 로고 오른쪽 슬롯 (검색·액션 등). 로고와 16px 띄고 남는 폭을 모두 차지하므로
|
|
@@ -40,12 +131,12 @@ export interface SGnbProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'>
|
|
|
40
131
|
topContent?: ReactNode;
|
|
41
132
|
/**
|
|
42
133
|
* 레일 상단 고정 슬롯. 레일 아이템이 많아 넘치면 아이템 목록(ul)만 스크롤되고
|
|
43
|
-
* 이 슬롯은 레일 상단(상단바 바로 아래)에 붙어 고정된다.
|
|
134
|
+
* 이 슬롯은 레일 상단(상단바 바로 아래)에 붙어 고정된다. showRail 일 때만 렌더된다.
|
|
44
135
|
*/
|
|
45
136
|
railTop?: ReactNode;
|
|
46
137
|
/**
|
|
47
138
|
* 레일 하단 고정 슬롯. 레일 아이템이 많아 넘치면 아이템 목록(ul)만 스크롤되고
|
|
48
|
-
* 이 슬롯은 레일 하단에 붙어 고정된다.
|
|
139
|
+
* 이 슬롯은 레일 하단에 붙어 고정된다. showRail 일 때만 렌더된다.
|
|
49
140
|
*/
|
|
50
141
|
railFooter?: ReactNode;
|
|
51
142
|
/**
|
|
@@ -80,6 +171,15 @@ export interface SGnbProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'>
|
|
|
80
171
|
defaultMenuWidth?: number;
|
|
81
172
|
/** 메뉴 폭이 확정될 때(드래그를 놓거나 방향키 조작). 드래그하는 동안에는 오지 않는다 */
|
|
82
173
|
onMenuWidthChange?: (width: number) => void;
|
|
174
|
+
/**
|
|
175
|
+
* system 슬롯(`SGnbSystem`). 놓이는 자리와 형태는 `header` 가 정한다.
|
|
176
|
+
* - fix : GNB 맨 아래 세로 판. 펼치면 메뉴 컬럼 바닥에, 접히면 `foldedFooter` 아래 레일 바닥에
|
|
177
|
+
* 여백 없이 붙는다. showRail 에서 메뉴가 없는 레일 아이템이 활성이면 메뉴 컬럼째 사라지므로
|
|
178
|
+
* 이 슬롯도 함께 빠진다.
|
|
179
|
+
* - full: 전폭 상단바 오른쪽 끝에 가로 한 줄로 선다. 상단바는 접어도 남으므로 조각들도 늘 남는다.
|
|
180
|
+
* 색·형태는 GNB 가 내려주므로 SGnbSystem 에 다시 넘기지 않아도 된다.
|
|
181
|
+
*/
|
|
182
|
+
system?: ReactNode;
|
|
83
183
|
/** 메뉴 landmark(nav) 의 접근성 레이블. 한 화면에 nav 가 여럿일 때 구분한다. */
|
|
84
184
|
ariaLabel?: string;
|
|
85
185
|
}
|
|
@@ -91,8 +191,9 @@ export interface SGnbProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'>
|
|
|
91
191
|
* header 가 배치와 접힘 형태를 정한다:
|
|
92
192
|
* - fix: 상단바가 GNB 컬럼(메뉴 폭) 안에 있다. 접으면 48px 세로 레일로 좁혀지고 상단바에는 폴드 버튼만 남는다.
|
|
93
193
|
* - full: 상단바가 레이아웃 전폭을 가로지르고 그 아래 [메뉴 | 페이지]. 접으면 메뉴만 사라진다.
|
|
194
|
+
* system 조각들도 메뉴 바닥이 아니라 이 상단바 오른쪽 끝으로 올라온다.
|
|
94
195
|
*
|
|
95
|
-
*
|
|
196
|
+
* showRail 이면 items 의 첫 depth 가 좌측 레일(아이콘+라벨 68px)로 서고, 선택된 레일 아이템의
|
|
96
197
|
* children 이 메뉴 패널의 depth1 이 된다 — 트리는 그대로 두고 어디부터 그릴지만 바뀐다.
|
|
97
198
|
* children 없는 레일 아이템은 자기 자신이 선택(리프)이라 메뉴 패널을 렌더하지 않는다. 이런 리프가
|
|
98
199
|
* 하나라도 있으면 활성에 따라 메뉴 폭이 출렁이므로 header 는 full 로 강제해 상단바를 전폭에 고정한다.
|
|
@@ -48,6 +48,8 @@ export declare const GNB_MENU: Record<SGnbType, {
|
|
|
48
48
|
depth1FontWeight: number;
|
|
49
49
|
itemFontSize: number;
|
|
50
50
|
itemLineHeight: number;
|
|
51
|
+
itemFontWeight: number;
|
|
52
|
+
itemFontWeightSelected: number;
|
|
51
53
|
}>;
|
|
52
54
|
/**
|
|
53
55
|
* 색상(color 축). light → --cmp-gnb-light-* 색, dark → --cmp-gnb-dark-* 색
|
|
@@ -78,7 +80,7 @@ export declare const GNB_COMMON: {
|
|
|
78
80
|
foldWidth: string;
|
|
79
81
|
};
|
|
80
82
|
/**
|
|
81
|
-
* 좌측 레일(
|
|
83
|
+
* 좌측 레일(showRail) — items 의 첫 depth 를 아이콘+라벨 버튼으로 세우는 1차 내비게이션.
|
|
82
84
|
* 선택 색은 레일 전용 토큰이 없어 메뉴 아이템의 선택 색(item-bg-selected / item-fg-selected)을 함께 쓴다.
|
|
83
85
|
*/
|
|
84
86
|
export declare const GNB_RAIL: {
|
|
@@ -114,13 +116,13 @@ export declare const GNB_EXPAND_MS = 200;
|
|
|
114
116
|
* 메뉴 고정 폭. 두 header 모두 메뉴는 이 폭으로 좌측에 붙는다(토큰 없음 → 상수).
|
|
115
117
|
* header="full" 에서 SLayout 이 "메뉴 오른쪽 = 페이지" 영역을 잡을 때도 이 값을 쓴다.
|
|
116
118
|
*/
|
|
117
|
-
export declare const GNB_MENU_WIDTH =
|
|
119
|
+
export declare const GNB_MENU_WIDTH = 214;
|
|
118
120
|
/**
|
|
119
121
|
* resizable 일 때 메뉴 폭이 움직일 수 있는 범위(px). 레일 폭은 고정이고 메뉴 컬럼만 늘고 준다.
|
|
120
|
-
*
|
|
122
|
+
* 기본 폭(GNB_MENU_WIDTH)이 이 범위 안에 있다. 대응 토큰이 없어 상수로 둔다.
|
|
121
123
|
*/
|
|
122
124
|
export declare const GNB_MENU_MIN_WIDTH = 200;
|
|
123
|
-
export declare const GNB_MENU_MAX_WIDTH =
|
|
125
|
+
export declare const GNB_MENU_MAX_WIDTH = 240;
|
|
124
126
|
/** 메뉴 폭 조절에서 방향키 한 번에 움직이는 양(px). Shift 를 함께 누르면 large. */
|
|
125
127
|
export declare const GNB_MENU_RESIZE_KEY_STEP: {
|
|
126
128
|
normal: number;
|
|
@@ -135,6 +137,12 @@ export declare const clampGnbMenuWidth: (width: number) => number;
|
|
|
135
137
|
* 런처를 쓰지 않으면 그 자리를 로고가 이어받는다 → GNB_FULL_LOGO_WIDTH_NO_LAUNCHER.
|
|
136
138
|
*/
|
|
137
139
|
export declare const GNB_FULL_LOGO_WIDTH = 140;
|
|
140
|
+
/**
|
|
141
|
+
* 앱런처 버튼·목록의 접근성 이름.
|
|
142
|
+
* 버튼에는 보이는 글자가 없고(아이콘만) 목록에도 제목이 없어, 둘이 같은 이름을 나눠 갖는다 —
|
|
143
|
+
* 스크린리더에서 "무엇을 눌러 무엇이 열렸는지" 가 한 이름으로 이어진다.
|
|
144
|
+
*/
|
|
145
|
+
export declare const GNB_LAUNCHER_LABEL = "app launcher";
|
|
138
146
|
/**
|
|
139
147
|
* 상단바에서 아이콘 버튼끼리 붙는 간격(px, 디자인 스펙 — 전용 토큰 없음).
|
|
140
148
|
* header="full" 의 런처↔폴드가 여기 해당한다. 슬롯(로고·topContent)과의 간격은
|
|
@@ -152,7 +160,7 @@ export declare const GNB_TOP_ICON_SIZE = 24;
|
|
|
152
160
|
*/
|
|
153
161
|
export declare const GNB_FULL_LOGO_WIDTH_NO_LAUNCHER: number;
|
|
154
162
|
/**
|
|
155
|
-
*
|
|
163
|
+
* showRail 에서 value 를 품은 첫 depth(레일) 아이템의 value.
|
|
156
164
|
* value 자체가 레일 아이템이면 그 값을, 어디에도 없으면 undefined 를 반환한다.
|
|
157
165
|
*/
|
|
158
166
|
export declare function findGnbRailValue(items: SGnbMenuItem[], value: string): string | undefined;
|
|
@@ -160,3 +168,8 @@ export declare function findGnbRailValue(items: SGnbMenuItem[], value: string):
|
|
|
160
168
|
export declare function findGnbSiblingValues(items: SGnbMenuItem[], value: string): string[];
|
|
161
169
|
/** value 로 선택된 아이템의 조상 value 목록(자기 자신 제외)을 반환 → 자동 펼침용 */
|
|
162
170
|
export declare function findGnbAncestors(items: SGnbMenuItem[], value: string): string[];
|
|
171
|
+
/**
|
|
172
|
+
* value 를 가진 아이템 아래의 **하위 가지**(children 을 가진 자손) value 목록을 반환.
|
|
173
|
+
* 부모를 펼칠 때 그 아래 가지도 전부 함께 펼치는 용도 — 리프는 펼침 대상이 아니라 제외한다.
|
|
174
|
+
*/
|
|
175
|
+
export declare function findGnbDescendantBranchValues(items: SGnbMenuItem[], value: string): string[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { SGnb, type SGnbProps } from './SGnb';
|
|
1
|
+
export { SGnb, SGnbSystemContext, type SGnbProps, type SGnbSystemContextValue } from './SGnb';
|
|
2
2
|
export { GNB_HEADER, GNB_MENU, GNB_COLORS, GNB_COMMON, GNB_FOLD_MS, GNB_FULL_LOGO_WIDTH, GNB_MENU_WIDTH, GNB_RAIL, GNB_RAIL_WIDTH, findGnbAncestors, findGnbRailValue, type SGnbType, type SGnbHeader, type SGnbColor, type SGnbMenuItem, } from './gnb.config';
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# SGnbSystem
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SGnbSystem
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `color?` | `SGnbSystemColor` | — | 색상(패널 표면). light = 흰 면, dark = 오션블루 면. 미지정 시 자기를 담은 SGnb 의 color 를 따른다(단독으로 쓰면 `'light'`). |
|
|
12
|
+
| `folded?` | `boolean` | — | 접힌(min) 형태 — 48px 레일 폭에 맞춰 알림·계정 아이콘만 남는다. 미지정 시 자기를 담은 SGnb 의 접힘 상태를 따른다. 상단바 자리에서는 뜻이 없다. |
|
|
13
|
+
| `actions?` | `SGnbSystemAction[]` | — | 행 목록. 각 원소는 `SSystemActionButton` 의 props 다(`color` 제외 · 계정 행은 `account` 로 따로 준다). 판에서는 맨 위에 쌓이고, 상단바에서는 맨 왼쪽에 선다. 옆(아래)에 다른 조각이 있으면 그 사이에 구분선이 그어진다. 접히면 자리가 없어 렌더되지 않는다. |
|
|
14
|
+
| `domain?` | `string` | — | 도메인 태그 텍스트. 접히면 자리가 없어 렌더되지 않는다 |
|
|
15
|
+
| `alert?` | `SGnbSystemAlert` | — | 알림 버튼. 없으면 렌더하지 않는다. 판에서는 설정과 나란히 서면 남는 폭을 먹고 혼자면 폭을 다 먹는다. 상단바에서는 자리가 넉넉하지 않아 라벨 없이 아이콘+개수만 선다. |
|
|
16
|
+
| `setting?` | `SGnbSystemSetting` | — | 설정 버튼. 없으면 렌더하지 않는다. 판에서는 알림과 나란히 서면 제 폭만 갖고 혼자면 폭을 다 먹고, 상단바에서는 라벨 없이 아이콘만 선다. 접히면 자리가 없어 렌더되지 않는다 — 접힌 상태에서도 닿아야 하면 SGnb 의 `foldedFooter` 에 둔다. |
|
|
17
|
+
| `account?` | `SGnbSystemAccount` | — | 계정 행. 없으면 렌더하지 않는다 |
|
|
18
|
+
|
|
19
|
+
## Types
|
|
20
|
+
|
|
21
|
+
### SGnbSystemColor
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
export type SGnbSystemColor = (typeof GNB_SYSTEM_COLORS)[number];
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### SGnbSystemAction
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
/**
|
|
31
|
+
* 패널 상단에 쌓이는 행 하나. `SSystemActionButton` 의 props 를 그대로 받는다 —
|
|
32
|
+
* 단 `color` 는 패널이 정하므로 받지 않고, 목록 key 로 쓸 `value` 만 더한다.
|
|
33
|
+
*
|
|
34
|
+
* `type: 'account'` 는 받지 않는다. 계정 행은 이 패널에 **하나뿐**이고 서는 자리도 맨 아래로
|
|
35
|
+
* 정해져 있어(§3-5-8) `account` prop 이 따로 있다 — 여기로도 받으면 계정 행이 둘인 패널이
|
|
36
|
+
* 만들어지고, 그중 하나는 자리가 틀린다.
|
|
37
|
+
*/
|
|
38
|
+
export type SGnbSystemAction = DistributiveOmit<
|
|
39
|
+
Exclude<SSystemActionButtonProps, { type: 'account' }>,
|
|
40
|
+
'color'
|
|
41
|
+
> & {
|
|
42
|
+
/** 목록 key. 없으면 순서를 key 로 쓴다 */
|
|
43
|
+
value?: string;
|
|
44
|
+
};
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### SGnbSystemAlert
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
/** 알림 버튼 */
|
|
51
|
+
export interface SGnbSystemAlert {
|
|
52
|
+
/** 라벨 텍스트. 기본 `'알림'` */
|
|
53
|
+
label?: string;
|
|
54
|
+
/**
|
|
55
|
+
* 읽지 않은 알림 개수. 1 이상이면 벨이 울리는 아이콘·강조색으로 바뀌고 개수가 붙는다.
|
|
56
|
+
* 개수를 적을 가로가 모자란 자리(접힌 레일 · 기본 폭보다 좁게 줄인 판)에서는 점 배지로 바뀐다.
|
|
57
|
+
* 표기는 컴포넌트가 맡는다 — 세 자리마다 콤마를 넣어 그리므로 앱이 포맷한 문자열을 넘기지 않는다.
|
|
58
|
+
*/
|
|
59
|
+
count?: number;
|
|
60
|
+
/** 클릭 */
|
|
61
|
+
onClick?: () => void;
|
|
62
|
+
/**
|
|
63
|
+
* 알림 버튼에 붙는 안내 툴팁의 문구(한 줄이 한 항목). 주면 뜬다 — **문구만 앱이 정하고**
|
|
64
|
+
* 색·방향·여닫힘은 컴포넌트가 쥔다: 색은 판이 light 면 기본, 그 밖(dark·상단바)이면 강조색이고
|
|
65
|
+
* 방향은 자리가 정한다(판·접힌 레일이면 오른쪽, 상단바면 아래).
|
|
66
|
+
*
|
|
67
|
+
* 스스로 사라지지 않는다 — **알림 버튼을 누르거나, 버튼에 얹었다 커서를 뺄 때** 닫히고,
|
|
68
|
+
* 같은 값을 계속 넘기는 동안에는 다시 뜨지 않는다.
|
|
69
|
+
*
|
|
70
|
+
* **다시 띄우려면 비웠다가 다시 넘긴다**(`undefined` → 문구). 문구가 같아도 상관없다 —
|
|
71
|
+
* 컴포넌트는 닫았다는 사실만 기억하고 문구 내용은 기억하지 않으므로, 새 알림마다 같은 안내를
|
|
72
|
+
* 다시 띄우는 화면도 막히지 않는다.
|
|
73
|
+
*/
|
|
74
|
+
tooltip?: string[];
|
|
75
|
+
/**
|
|
76
|
+
* 알림을 누르면 뜨는 목록의 **내용**. 주면 컴포넌트가 알림 버튼에 붙여 띄운다 —
|
|
77
|
+
* 목록에 무엇을 쌓을지는 서비스마다 다르지만 **뜨는 자리는 늘 같아야 하므로**, 방향·앵커·
|
|
78
|
+
* 여닫힘(바깥 클릭·ESC 포함)과 배경·라운드·그림자는 컴포넌트가 쥐고 앱은 안에 담을 것만 준다.
|
|
79
|
+
* 방향은 자리가 정한다 — 판·접힌 레일이면 버튼 오른쪽, 상단바면 아래.
|
|
80
|
+
*/
|
|
81
|
+
listBox?: ReactNode;
|
|
82
|
+
/**
|
|
83
|
+
* 알림 목록이 열리고 닫힐 때. 여닫는 것은 알림 버튼이 스스로 하므로 **그 사실을 알아야 할
|
|
84
|
+
* 때만** 준다(연 김에 읽음 처리하거나, 열려 있는 동안 다른 층을 접어 두는 화면).
|
|
85
|
+
*
|
|
86
|
+
* 앱이 누르지 않은 닫힘도 온다: GNB 를 접거나 펴면 알림 버튼이 다른 자리로 옮겨 서므로
|
|
87
|
+
* 목록이 닫히고 `false` 가 온다(계정 행과 같다).
|
|
88
|
+
*/
|
|
89
|
+
onOpenChange?: (open: boolean) => void;
|
|
90
|
+
/**
|
|
91
|
+
* 안내 툴팁이 닫힐 때. 받아서 `tooltip` 을 비워 두는 것이 기본 사용법이다 — 그러면 앱이
|
|
92
|
+
* 다음에 넘기는 문구가 곧 다음 안내가 된다.
|
|
93
|
+
*
|
|
94
|
+
* 컴포넌트가 아는 "다시 뜨지 않는다" 는 **이 자리가 서 있는 동안**뿐이라(새로고침하거나
|
|
95
|
+
* GNB 를 접어 알림이 다른 자리로 옮겨 서면 새로 마운트된다), 그 사용자에게 두 번 다시 보이지
|
|
96
|
+
* 않아야 하면 앱이 이 신호를 저장해 두고 `tooltip` 을 그만 넘긴다.
|
|
97
|
+
*/
|
|
98
|
+
onTooltipDismiss?: () => void;
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### SGnbSystemSetting
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
/** 설정 버튼 */
|
|
106
|
+
export interface SGnbSystemSetting {
|
|
107
|
+
/** 라벨 텍스트. 기본 `'설정'` */
|
|
108
|
+
label?: string;
|
|
109
|
+
/** 클릭 */
|
|
110
|
+
onClick?: () => void;
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### SGnbSystemAccount
|
|
115
|
+
|
|
116
|
+
```ts
|
|
117
|
+
/** 계정 행 */
|
|
118
|
+
export interface SGnbSystemAccount {
|
|
119
|
+
/** 계정 이름 */
|
|
120
|
+
label?: string;
|
|
121
|
+
/** 클릭. 패널은 어차피 열리므로, 여는 것 말고 따로 할 일이 있을 때만 준다 */
|
|
122
|
+
onClick?: () => void;
|
|
123
|
+
/**
|
|
124
|
+
* 계정 리스트박스가 열리고 닫힐 때. 여닫는 것은 계정 행이 스스로 하므로 **그 사실을 알아야 할
|
|
125
|
+
* 때만** 준다 — 열려 있는 동안 다른 층을 접어 두거나, 연 것을 기록하는 화면이 그렇다.
|
|
126
|
+
*
|
|
127
|
+
* 앱이 누르지 않은 닫힘도 온다: `header="fix"` 에서 GNB 를 접거나 펴면 계정 행이 다른 자리로
|
|
128
|
+
* 옮겨 서므로 패널이 닫히고 `false` 가 온다.
|
|
129
|
+
*/
|
|
130
|
+
onOpenChange?: (open: boolean) => void;
|
|
131
|
+
/**
|
|
132
|
+
* 누르면 뜨는 계정 리스트박스(`SAccountListBox`) 내용. **필수다** — 계정 행은 늘 이 패널의
|
|
133
|
+
* 트리거이고, 눌러도 아무것도 뜨지 않는 계정 행은 없다.
|
|
134
|
+
* 뜨는 방향은 패널이 놓인 자리가 정하므로 앱이 넘기지 않는다.
|
|
135
|
+
*/
|
|
136
|
+
listBox: SAccountListBoxContent;
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### GNB_SYSTEM_COLORS
|
|
141
|
+
|
|
142
|
+
```ts
|
|
143
|
+
/**
|
|
144
|
+
* SGnbSystem 설정.
|
|
145
|
+
*
|
|
146
|
+
* 토큰은 GNB system 패널 한 벌(`--cmp-gnb-system-*`)이다.
|
|
147
|
+
* 패널(배경·경계·구분선·간격) → --cmp-gnb-system-panel-*
|
|
148
|
+
* 도메인 태그 → --cmp-gnb-system-domainTag-*
|
|
149
|
+
* 행 공통(높이·라운드·아이콘 프레임) → --cmp-gnb-system-item-* (SSystemActionButton 과 공유)
|
|
150
|
+
* 알림 버튼 → --cmp-gnb-system-alertButton-*
|
|
151
|
+
* 설정 버튼 → --cmp-gnb-system-setting-*
|
|
152
|
+
* 펼침·접힘 패널 여백 → --cmp-gnb-system-project-padding · --cmp-gnb-system-min-padding
|
|
153
|
+
*
|
|
154
|
+
* 타이포그래피는 CSS 변수가 아니라 `.typo-*` 프리셋으로 나온다.
|
|
155
|
+
* domainTag.typography → typo-body-sm-medium (12/500/20)
|
|
156
|
+
* item.label.typography → typo-body-sm-semibold (12/600/20)
|
|
157
|
+
* alertButton.count → typo-body-md-bold (13/700/22)
|
|
158
|
+
*/
|
|
159
|
+
|
|
160
|
+
/** 색상(표면). light = 흰 면, dark = 오션블루 면. GNB 의 color 를 그대로 따라간다 */
|
|
161
|
+
export const GNB_SYSTEM_COLORS = ['light', 'dark'] as const;
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Dependencies
|
|
165
|
+
|
|
166
|
+
### Depends on
|
|
167
|
+
|
|
168
|
+
- [SAccountListBox](../SAccountListBox)
|
|
169
|
+
- [SGnb](../SGnb)
|
|
170
|
+
- [SIcon](../SIcon)
|
|
171
|
+
- [SPortal](../SPortal)
|
|
172
|
+
- [SSystemActionButton](../SSystemActionButton)
|
|
173
|
+
- [STooltip](../STooltip)
|
|
174
|
+
|
|
175
|
+
### Graph
|
|
176
|
+
|
|
177
|
+
```mermaid
|
|
178
|
+
graph TD;
|
|
179
|
+
SGnbSystem --> SAccountListBox
|
|
180
|
+
SGnbSystem --> SGnb
|
|
181
|
+
SGnbSystem --> SIcon
|
|
182
|
+
SGnbSystem --> SPortal
|
|
183
|
+
SGnbSystem --> SSystemActionButton
|
|
184
|
+
SGnbSystem --> STooltip
|
|
185
|
+
style SGnbSystem fill:#f9f,stroke:#333,stroke-width:4px
|
|
186
|
+
```
|