sellmate-design-system-react 9.0.0-beta.8 → 9.0.0-beta.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +3974 -267
- package/README.md +76 -24
- package/bin/sellmate-ds.mjs +91 -59
- package/dist/components/SAccountListBox/AccountListBoxPortal.d.ts +31 -0
- package/dist/components/SAccountListBox/README.md +86 -0
- package/dist/components/SAccountListBox/SAccountListBox.d.ts +79 -0
- package/dist/components/SAccountListBox/SystemMenuPortal.d.ts +58 -0
- package/dist/components/SAccountListBox/accountListBox.config.d.ts +64 -0
- package/dist/components/SAccountListBox/index.d.ts +2 -0
- package/dist/components/SActionModal/README.md +1 -0
- package/dist/components/SActionModal/SActionModal.d.ts +9 -1
- package/dist/components/SBadge/README.md +27 -0
- package/dist/components/SBadge/SBadge.d.ts +1 -1
- package/dist/components/SBarChart/README.md +122 -0
- package/dist/components/SBarChart/SBarChart.d.ts +99 -0
- package/dist/components/SBarChart/barChart.config.d.ts +85 -0
- package/dist/components/SBarChart/index.d.ts +2 -0
- package/dist/components/SBarcodeInput/README.md +14 -4
- package/dist/components/SBarcodeInput/SBarcodeInput.d.ts +25 -3
- package/dist/components/SButton/README.md +40 -0
- package/dist/components/SCalendar/README.md +13 -0
- package/dist/components/SCalendarBoard/CalendarDayCard.d.ts +53 -0
- package/dist/components/SCalendarBoard/CalendarDayEventListBox.d.ts +26 -0
- package/dist/components/SCalendarBoard/CalendarEventButton.d.ts +20 -0
- package/dist/components/SCalendarBoard/CalendarMoreButton.d.ts +18 -0
- package/dist/components/SCalendarBoard/README.md +148 -0
- package/dist/components/SCalendarBoard/SCalendarBoard.d.ts +83 -0
- package/dist/components/SCalendarBoard/calendar-board-layout.d.ts +59 -0
- package/dist/components/SCalendarBoard/calendarBoard.config.d.ts +38 -0
- package/dist/components/SCalendarBoard/index.d.ts +3 -0
- package/dist/components/SCalendarBoard/types.d.ts +40 -0
- package/dist/components/SCallout/README.md +17 -1
- package/dist/components/SCallout/SCallout.d.ts +14 -4
- package/dist/components/SCard/README.md +17 -0
- package/dist/components/SCard/SCard.d.ts +26 -2
- package/dist/components/SChatAttachedFile/README.md +33 -0
- package/dist/components/SChatAttachedFile/SChatAttachedFile.d.ts +13 -0
- package/dist/components/SChatAttachedFile/chatAttachedFile.config.d.ts +23 -0
- package/dist/components/SChatAttachedFile/index.d.ts +2 -0
- package/dist/components/SChatFile/README.md +33 -0
- package/dist/components/SChatFile/SChatFile.d.ts +37 -0
- package/dist/components/SChatFile/chatFile.config.d.ts +56 -0
- package/dist/components/SChatFile/index.d.ts +2 -0
- package/dist/components/SChatInput/README.md +44 -0
- package/dist/components/SChatInput/SChatInput.d.ts +60 -0
- package/dist/components/SChatInput/index.d.ts +1 -0
- package/dist/components/SChatMessage/README.md +86 -0
- package/dist/components/SChatMessage/SChatMessage.d.ts +123 -0
- package/dist/components/SChatMessage/index.d.ts +1 -0
- package/dist/components/SChatSystemMessage/README.md +12 -0
- package/dist/components/SChatSystemMessage/SChatSystemMessage.d.ts +18 -0
- package/dist/components/SChatSystemMessage/index.d.ts +1 -0
- package/dist/components/SCheckbox/README.md +8 -0
- package/dist/components/SChip/README.md +25 -0
- package/dist/components/SChip/SChip.d.ts +8 -0
- package/dist/components/SChip/index.d.ts +1 -1
- package/dist/components/SChipFilter/README.md +369 -14
- package/dist/components/SChipFilter/SChipFilter.d.ts +169 -60
- package/dist/components/SChipFilter/index.d.ts +1 -1
- package/dist/components/SChipInput/README.md +18 -2
- package/dist/components/SChipInput/SChipInput.d.ts +23 -3
- package/dist/components/SChipInput/index.d.ts +1 -1
- package/dist/components/SCircleProgress/README.md +13 -2
- package/dist/components/SCircleProgress/SCircleProgress.d.ts +11 -3
- package/dist/components/SConfirmModal/README.md +13 -4
- package/dist/components/SConfirmModal/SConfirmModal.d.ts +46 -9
- package/dist/components/SContextAlert/README.md +52 -0
- package/dist/components/SContextAlert/SContextAlert.d.ts +51 -0
- package/dist/components/SContextAlert/contextAlert.config.d.ts +22 -0
- package/dist/components/SContextAlert/index.d.ts +2 -0
- package/dist/components/SDatePicker/README.md +22 -2
- package/dist/components/SDatePicker/SDatePicker.d.ts +42 -5
- package/dist/components/SDateRangePicker/README.md +22 -4
- package/dist/components/SDateRangePicker/SDateRangePicker.d.ts +44 -7
- package/dist/components/SDivider/README.md +7 -0
- package/dist/components/SDivider/SDivider.d.ts +11 -0
- package/dist/components/SDonutChart/README.md +105 -0
- package/dist/components/SDonutChart/SDonutChart.d.ts +82 -0
- package/dist/components/SDonutChart/index.d.ts +1 -0
- package/dist/components/SDraggableItem/README.md +37 -0
- package/dist/components/SDraggableItem/SDraggableItem.d.ts +2 -0
- package/dist/components/SDraggableItem/index.d.ts +1 -1
- package/dist/components/SDraggableList/README.md +33 -3
- package/dist/components/SDraggableList/SDraggableList.d.ts +18 -3
- package/dist/components/SDraggableList/index.d.ts +1 -1
- package/dist/components/SDrawer/README.md +8 -0
- package/dist/components/SDropdownButton/README.md +19 -0
- package/dist/components/SEditor/EditorBody.d.ts +36 -0
- package/dist/components/SEditor/EditorToolbar.d.ts +93 -0
- package/dist/components/SEditor/README.md +205 -0
- package/dist/components/SEditor/SEditor.d.ts +128 -0
- package/dist/components/SEditor/editor-icons.d.ts +63 -0
- package/dist/components/SEditor/editor.config.d.ts +119 -0
- package/dist/components/SEditor/index.d.ts +8 -0
- package/dist/components/SEditor/tiptap-api.d.ts +29 -0
- package/dist/components/SEditor/use-is-mobile.d.ts +14 -0
- package/dist/components/SExpansionItem/README.md +38 -2
- package/dist/components/SExpansionItem/SExpansionItem.d.ts +8 -2
- package/dist/components/SExpansionItem/index.d.ts +1 -1
- package/dist/components/SField/README.md +37 -5
- package/dist/components/SField/SField.d.ts +40 -8
- package/dist/components/SField/index.d.ts +1 -1
- package/dist/components/SFilePicker/README.md +20 -4
- package/dist/components/SFilePicker/SFilePicker.d.ts +26 -6
- package/dist/components/SFooter/README.md +44 -0
- package/dist/components/SFooter/SFooter.d.ts +29 -13
- package/dist/components/SFooter/index.d.ts +1 -1
- package/dist/components/SForm/README.md +12 -1
- package/dist/components/SForm/SForm.d.ts +2 -2
- package/dist/components/SGhostButton/README.md +28 -4
- package/dist/components/SGhostButton/SGhostButton.d.ts +4 -1
- package/dist/components/SGnb/README.md +109 -8
- package/dist/components/SGnb/SGnb.d.ts +112 -11
- package/dist/components/SGnb/gnb.config.d.ts +18 -5
- package/dist/components/SGnb/index.d.ts +1 -1
- package/dist/components/SGnbSystem/README.md +186 -0
- package/dist/components/SGnbSystem/SGnbSystem.d.ts +179 -0
- package/dist/components/SGnbSystem/gnbSystem.config.d.ts +122 -0
- package/dist/components/SGnbSystem/index.d.ts +2 -0
- package/dist/components/SGuide/README.md +16 -1
- package/dist/components/SGuide/SGuide.d.ts +5 -2
- package/dist/components/SIcon/README.md +20 -0
- package/dist/components/SIcon/SIcon.d.ts +1 -1
- package/dist/components/SIcon/icons.gen.d.ts +20 -1
- package/dist/components/SImage/README.md +23 -1
- package/dist/components/SImage/SImage.d.ts +11 -8
- package/dist/components/SInput/README.md +8 -4
- package/dist/components/SInput/SInput.d.ts +17 -5
- package/dist/components/SKeyValueTable/README.md +88 -0
- package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +30 -3
- package/dist/components/SKeyValueTable/index.d.ts +1 -1
- package/dist/components/SLauncherListBox/README.md +82 -0
- package/dist/components/SLauncherListBox/SLauncherListBox.d.ts +80 -0
- package/dist/components/SLauncherListBox/index.d.ts +2 -0
- package/dist/components/SLauncherListBox/launcherListBox.config.d.ts +154 -0
- package/dist/components/SLayout/README.md +22 -1
- package/dist/components/SLayout/SLayout.d.ts +6 -2
- package/dist/components/SLayout/index.d.ts +1 -1
- package/dist/components/SLineChart/README.md +131 -0
- package/dist/components/SLineChart/SLineChart.d.ts +110 -0
- package/dist/components/SLineChart/index.d.ts +1 -0
- package/dist/components/SLineChart/lineChart.config.d.ts +95 -0
- package/dist/components/SLinearProgress/README.md +16 -1
- package/dist/components/SLinearProgress/SLinearProgress.d.ts +11 -2
- package/dist/components/SLinearProgress/index.d.ts +1 -1
- package/dist/components/SList/README.md +15 -2
- package/dist/components/SList/SList.d.ts +7 -3
- package/dist/components/SList/index.d.ts +1 -1
- package/dist/components/SListItem/README.md +43 -2
- package/dist/components/SListItem/SListItem.d.ts +8 -2
- package/dist/components/SListItem/index.d.ts +1 -1
- package/dist/components/SLoadingContainer/index.d.ts +1 -1
- package/dist/components/SLoadingContainer/loading.d.ts +41 -6
- package/dist/components/SLoadingModal/README.md +10 -2
- package/dist/components/SLoadingModal/SLoadingModal.d.ts +4 -4
- package/dist/components/SLoadingModal/index.d.ts +1 -1
- package/dist/components/SLoginCard/README.md +37 -0
- package/dist/components/SLoginCard/SLoginCard.d.ts +43 -0
- package/dist/components/SLoginCard/index.d.ts +1 -0
- package/dist/components/SLogo/README.md +103 -0
- package/dist/components/SLogo/SLogo.d.ts +72 -0
- package/dist/components/SLogo/index.d.ts +2 -0
- package/dist/components/SLogo/logo.config.d.ts +29 -0
- package/dist/components/SLogo/logos.d.ts +16 -0
- package/dist/components/SMeatballButton/README.md +67 -0
- package/dist/components/SMeatballButton/SMeatballButton.d.ts +36 -0
- package/dist/components/SMeatballButton/index.d.ts +1 -0
- package/dist/components/SModal/README.md +15 -5
- package/dist/components/SModal/SModal.d.ts +1 -1
- package/dist/components/SNumberInput/README.md +19 -8
- package/dist/components/SNumberInput/SNumberInput.d.ts +49 -7
- package/dist/components/SPage/README.md +105 -5
- package/dist/components/SPage/SPage.d.ts +34 -10
- package/dist/components/SPage/SPageHeader.d.ts +31 -13
- package/dist/components/SPage/index.d.ts +2 -2
- package/dist/components/SPage/page-column.d.ts +34 -0
- package/dist/components/SPage/page-width.d.ts +23 -0
- package/dist/components/SPage/page.config.d.ts +26 -0
- package/dist/components/SPieChart/README.md +93 -0
- package/dist/components/SPieChart/SPieChart.d.ts +73 -0
- package/dist/components/SPieChart/index.d.ts +1 -0
- package/dist/components/SPopover/README.md +15 -0
- package/dist/components/SPopup/README.md +26 -2
- package/dist/components/SPopup/SPopup.d.ts +13 -10
- package/dist/components/SPopup/index.d.ts +1 -1
- package/dist/components/SPortal/README.md +20 -0
- package/dist/components/SRadio/README.md +20 -0
- package/dist/components/SRadioButton/README.md +26 -0
- package/dist/components/SRadioButton/SRadioButton.d.ts +9 -2
- package/dist/components/SRadioCard/README.md +78 -0
- package/dist/components/SRadioCard/SRadioCard.d.ts +29 -0
- package/dist/components/SRadioCard/SRadioCardGroup.d.ts +36 -0
- package/dist/components/SRadioCard/index.d.ts +2 -0
- package/dist/components/SScrollArea/README.md +28 -0
- package/dist/components/SScrollArea/SScrollArea.d.ts +17 -0
- package/dist/components/SSearchInput/README.md +63 -0
- package/dist/components/SSearchInput/SSearchInput.d.ts +52 -0
- package/dist/components/SSearchInput/index.d.ts +1 -0
- package/dist/components/SSectionHeaderCard/README.md +38 -0
- package/dist/components/SSectionHeaderCard/SSectionHeaderCard.d.ts +19 -0
- package/dist/components/SSelect/README.md +64 -11
- package/dist/components/SSelect/SSelect.d.ts +135 -15
- package/dist/components/SSelect/index.d.ts +1 -1
- package/dist/components/SSelect/select.config.d.ts +17 -0
- package/dist/components/SSkeleton/README.md +55 -0
- package/dist/components/SSkeleton/SSkeleton.d.ts +39 -0
- package/dist/components/SSkeleton/index.d.ts +2 -0
- package/dist/components/SSkeleton/skeleton.config.d.ts +22 -0
- package/dist/components/SSplitter/README.md +17 -2
- package/dist/components/SSplitter/SSplitter.d.ts +7 -3
- package/dist/components/SStepper/README.md +26 -0
- package/dist/components/SSwitch/README.md +13 -1
- package/dist/components/SSwitch/SSwitch.d.ts +1 -3
- package/dist/components/SSystemActionButton/README.md +246 -0
- package/dist/components/SSystemActionButton/SSystemActionButton.d.ts +167 -0
- package/dist/components/SSystemActionButton/index.d.ts +2 -0
- package/dist/components/SSystemActionButton/systemActionButton.config.d.ts +93 -0
- package/dist/components/STable/README.md +135 -20
- package/dist/components/STable/STable.d.ts +292 -46
- package/dist/components/STable/index.d.ts +1 -1
- package/dist/components/STableBar/README.md +1 -0
- package/dist/components/STableBar/STableBar.d.ts +8 -1
- package/dist/components/STabs/README.md +13 -1
- package/dist/components/STabs/STabs.d.ts +2 -2
- package/dist/components/STag/README.md +55 -0
- package/dist/components/STag/STag.d.ts +3 -1
- package/dist/components/STag/tag.config.d.ts +1 -1
- package/dist/components/STextLink/README.md +21 -1
- package/dist/components/STextLink/STextLink.d.ts +5 -1
- package/dist/components/STextarea/README.md +12 -5
- package/dist/components/STextarea/STextarea.d.ts +49 -6
- package/dist/components/STimePicker/README.md +19 -2
- package/dist/components/STimePicker/STimePicker.d.ts +36 -6
- package/dist/components/STimePicker/timepicker.config.d.ts +4 -2
- package/dist/components/STimeRangePicker/README.md +31 -2
- package/dist/components/STimeRangePicker/STimeRangePicker.d.ts +35 -6
- package/dist/components/SToast/README.md +25 -1
- package/dist/components/SToast/SToast.d.ts +2 -2
- package/dist/components/SToggle/README.md +8 -0
- package/dist/components/SToggle/index.d.ts +1 -1
- package/dist/components/STooltip/README.md +27 -1
- package/dist/components/STooltip/STooltip.d.ts +1 -1
- package/dist/components/STree/README.md +42 -4
- package/dist/components/STree/STree.d.ts +18 -6
- package/dist/components/STree/STree.examples.d.ts +2 -0
- package/dist/docs/Gallery.d.ts +9 -0
- package/dist/docs/RecipeGallery.d.ts +13 -0
- package/dist/docs/gallery-previews.d.ts +24 -0
- package/dist/fonts/LICENSE.txt +94 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.0.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.1.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.10.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.11.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.12.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.13.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.14.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.15.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.16.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.17.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.18.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.19.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.2.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.20.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.21.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.22.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.23.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.24.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.25.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.26.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.27.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.28.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.29.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.3.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.30.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.31.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.32.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.33.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.34.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.35.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.36.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.37.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.38.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.39.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.4.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.40.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.41.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.42.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.43.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.44.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.45.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.46.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.47.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.48.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.49.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.5.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.50.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.51.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.52.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.53.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.54.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.55.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.56.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.57.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.58.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.59.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.6.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.60.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.61.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.62.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.63.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.64.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.65.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.66.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.67.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.68.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.69.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.7.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.70.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.71.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.72.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.73.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.74.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.75.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.76.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.77.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.78.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.79.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.8.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.80.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.81.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.82.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.83.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.84.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.85.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.86.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.87.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.88.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.89.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.9.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.90.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.91.woff2 +0 -0
- package/dist/index.cjs +21789 -10666
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +23 -0
- package/dist/index.js +21704 -10665
- package/dist/index.js.map +1 -1
- package/dist/lib/chart/cartesian.d.ts +56 -0
- package/dist/lib/chart/frame.d.ts +21 -0
- package/dist/lib/chart/hover-dim.d.ts +19 -0
- package/dist/lib/chart/legend.d.ts +21 -0
- package/dist/lib/chart/palette.d.ts +28 -0
- package/dist/lib/chart/radial.d.ts +99 -0
- package/dist/lib/chart/scale.d.ts +26 -0
- package/dist/lib/chart/tooltip.d.ts +60 -0
- package/dist/lib/chart/types.d.ts +29 -0
- package/dist/lib/chart/use-element-size.d.ts +39 -0
- package/dist/lib/date.d.ts +2 -1
- package/dist/lib/depth-filter.d.ts +27 -0
- package/dist/lib/doc-sections.d.ts +35 -0
- package/dist/lib/dropdown-menu.d.ts +19 -0
- package/dist/lib/field-width.d.ts +31 -0
- package/dist/lib/floating-height.d.ts +15 -0
- package/dist/lib/global-overlay.d.ts +5 -0
- package/dist/lib/hover-preview.d.ts +32 -0
- package/dist/lib/inert.d.ts +11 -0
- package/dist/lib/overlay-scrollbar.d.ts +32 -0
- package/dist/lib/row-metrics.d.ts +61 -0
- package/dist/lib/story-docs.d.ts +19 -3
- package/dist/llms-full.txt +9674 -2059
- package/dist/llms.txt +4062 -326
- package/dist/playground/categories.d.ts +19 -0
- package/dist/pretendard.css +937 -0
- package/dist/recipes/AppShell.d.ts +21 -0
- package/dist/recipes/CategoryManagePage.d.ts +1 -0
- package/dist/recipes/ConsultConsolePage.d.ts +1 -0
- package/dist/recipes/ExcelFilePopupPage.d.ts +5 -0
- package/dist/recipes/LoginPage.d.ts +6 -0
- package/dist/recipes/ProductBulkUploadPage.d.ts +1 -0
- package/dist/recipes/ProductCreatePage.d.ts +1 -0
- package/dist/recipes/ProductCreateSectionsPage.d.ts +5 -0
- package/dist/recipes/ProductDetailInlineEditPage.d.ts +9 -0
- package/dist/recipes/ProductDetailPage.d.ts +1 -0
- package/dist/recipes/ProductListChipFilterPage.d.ts +1 -0
- package/dist/recipes/ProductListPage.d.ts +1 -0
- package/dist/recipes/ProductOverlayPage.d.ts +1 -0
- package/dist/recipes/SalesDashboardPage.d.ts +1 -0
- package/dist/recipes/SettingsPage.d.ts +1 -0
- package/dist/recipes/StoreSetupPage.d.ts +1 -0
- package/dist/recipes/TransferOrderPopupPage.d.ts +2 -0
- package/dist/recipes/api.d.ts +220 -0
- package/dist/recipes/recipe-story.d.ts +33 -0
- package/dist/recipes/router.d.ts +9 -0
- package/dist/styles.css +3541 -262
- package/dist/theme.css +598 -28
- package/eslint/index.mjs +44 -35
- package/eslint/lib/class-names.mjs +23 -25
- package/eslint/lib/table-column.mjs +34 -8
- package/eslint/rules/component-group-gap.mjs +32 -30
- package/eslint/rules/divider-vertical-height.mjs +137 -0
- package/eslint/rules/field-width-grade.mjs +69 -52
- package/eslint/rules/no-arbitrary-class.mjs +63 -20
- package/eslint/rules/no-off-scale-spacing.mjs +61 -41
- package/eslint/rules/no-raw-html-control.mjs +38 -36
- package/eslint/rules/prefer-typo-preset.mjs +23 -17
- package/eslint/rules/require-locale-number.mjs +14 -19
- package/eslint/rules/table-column-width.mjs +114 -0
- package/eslint/rules/table-numeric-align.mjs +14 -14
- package/eslint/scale.gen.mjs +6 -3
- package/package.json +19 -5
package/eslint/index.mjs
CHANGED
|
@@ -4,28 +4,32 @@
|
|
|
4
4
|
* AGENTS.md 의 규칙 중 정적으로 검출 가능한 것을 린트로 강제한다.
|
|
5
5
|
* 사용법은 README 의 "ESLint 설정" 절 참조.
|
|
6
6
|
*/
|
|
7
|
-
import noRawHtmlControl from
|
|
8
|
-
import noArbitraryClass from
|
|
9
|
-
import noOffScaleSpacing from
|
|
10
|
-
import preferTypoPreset from
|
|
11
|
-
import tableNumericAlign from
|
|
12
|
-
import requireLocaleNumber from
|
|
13
|
-
import componentGroupGap from
|
|
14
|
-
import fieldWidthGrade from
|
|
7
|
+
import noRawHtmlControl from './rules/no-raw-html-control.mjs';
|
|
8
|
+
import noArbitraryClass from './rules/no-arbitrary-class.mjs';
|
|
9
|
+
import noOffScaleSpacing from './rules/no-off-scale-spacing.mjs';
|
|
10
|
+
import preferTypoPreset from './rules/prefer-typo-preset.mjs';
|
|
11
|
+
import tableNumericAlign from './rules/table-numeric-align.mjs';
|
|
12
|
+
import requireLocaleNumber from './rules/require-locale-number.mjs';
|
|
13
|
+
import componentGroupGap from './rules/component-group-gap.mjs';
|
|
14
|
+
import fieldWidthGrade from './rules/field-width-grade.mjs';
|
|
15
|
+
import tableColumnWidth from './rules/table-column-width.mjs';
|
|
16
|
+
import dividerVerticalHeight from './rules/divider-vertical-height.mjs';
|
|
15
17
|
|
|
16
|
-
const PLUGIN_NAME =
|
|
18
|
+
const PLUGIN_NAME = 'sellmate';
|
|
17
19
|
|
|
18
20
|
const plugin = {
|
|
19
|
-
meta: { name:
|
|
21
|
+
meta: { name: 'eslint-plugin-sellmate' },
|
|
20
22
|
rules: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
'no-raw-html-control': noRawHtmlControl,
|
|
24
|
+
'no-arbitrary-class': noArbitraryClass,
|
|
25
|
+
'no-off-scale-spacing': noOffScaleSpacing,
|
|
26
|
+
'prefer-typo-preset': preferTypoPreset,
|
|
27
|
+
'table-numeric-align': tableNumericAlign,
|
|
28
|
+
'require-locale-number': requireLocaleNumber,
|
|
29
|
+
'component-group-gap': componentGroupGap,
|
|
30
|
+
'field-width-grade': fieldWidthGrade,
|
|
31
|
+
'table-column-width': tableColumnWidth,
|
|
32
|
+
'divider-vertical-height': dividerVerticalHeight,
|
|
29
33
|
},
|
|
30
34
|
};
|
|
31
35
|
|
|
@@ -43,24 +47,28 @@ const plugin = {
|
|
|
43
47
|
const recommended = [
|
|
44
48
|
{
|
|
45
49
|
// 컬럼 정의를 .ts 파일로 분리하는 경우가 있어 tsx 뿐 아니라 ts 도 포함한다
|
|
46
|
-
files: [
|
|
50
|
+
files: ['**/*.{js,jsx,ts,tsx}'],
|
|
47
51
|
plugins: { [PLUGIN_NAME]: plugin },
|
|
48
52
|
rules: {
|
|
49
53
|
// 스케일 밖 `gap-sd-13` 은 아무 스타일도 만들지 않는다 — 조용히 깨진다
|
|
50
|
-
[`${PLUGIN_NAME}/no-off-scale-spacing`]:
|
|
54
|
+
[`${PLUGIN_NAME}/no-off-scale-spacing`]: 'error',
|
|
51
55
|
// 생 <button>/<table> 은 디자인 시스템을 통째로 우회하는 것 (스타일 자유와 무관)
|
|
52
|
-
[`${PLUGIN_NAME}/no-raw-html-control`]:
|
|
56
|
+
[`${PLUGIN_NAME}/no-raw-html-control`]: 'error',
|
|
57
|
+
// 세로 SDivider 에 className 으로 높이를 주면 self-stretch 가 무효가 되어 선이 위로 솟는다
|
|
58
|
+
[`${PLUGIN_NAME}/divider-vertical-height`]: 'error',
|
|
53
59
|
|
|
54
60
|
// 아래는 디자인 컨벤션 — 권고만 한다
|
|
55
|
-
[`${PLUGIN_NAME}/prefer-typo-preset`]:
|
|
56
|
-
[`${PLUGIN_NAME}/component-group-gap`]:
|
|
57
|
-
[`${PLUGIN_NAME}/table-numeric-align`]:
|
|
58
|
-
[`${PLUGIN_NAME}/require-locale-number`]:
|
|
61
|
+
[`${PLUGIN_NAME}/prefer-typo-preset`]: 'warn',
|
|
62
|
+
[`${PLUGIN_NAME}/component-group-gap`]: 'warn',
|
|
63
|
+
[`${PLUGIN_NAME}/table-numeric-align`]: 'warn',
|
|
64
|
+
[`${PLUGIN_NAME}/require-locale-number`]: 'warn',
|
|
59
65
|
// 폭 등급 환산이 아직 잠정치라 권고에 둔다 (디자인 확정표가 오면 error 승격 검토)
|
|
60
|
-
[`${PLUGIN_NAME}/field-width-grade`]:
|
|
66
|
+
[`${PLUGIN_NAME}/field-width-grade`]: 'warn',
|
|
67
|
+
// 컬럼 폭 — 폭 미지정(기본 120px)·스페이서 오용은 권고, % · clamp() 는 조용히 깨지므로 error
|
|
68
|
+
[`${PLUGIN_NAME}/table-column-width`]: 'warn',
|
|
61
69
|
|
|
62
70
|
// 앱 고유 치수(w-[280px])·일회성 값에는 임의 값이 정당하다. 필요한 팀만 켠다.
|
|
63
|
-
[`${PLUGIN_NAME}/no-arbitrary-class`]:
|
|
71
|
+
[`${PLUGIN_NAME}/no-arbitrary-class`]: 'off',
|
|
64
72
|
},
|
|
65
73
|
},
|
|
66
74
|
];
|
|
@@ -76,14 +84,15 @@ const strict = [
|
|
|
76
84
|
...recommended[0],
|
|
77
85
|
rules: {
|
|
78
86
|
...recommended[0].rules,
|
|
79
|
-
[`${PLUGIN_NAME}/no-raw-html-control`]: [
|
|
80
|
-
[`${PLUGIN_NAME}/no-arbitrary-class`]:
|
|
81
|
-
[`${PLUGIN_NAME}/no-off-scale-spacing`]: [
|
|
82
|
-
[`${PLUGIN_NAME}/prefer-typo-preset`]:
|
|
83
|
-
[`${PLUGIN_NAME}/component-group-gap`]:
|
|
84
|
-
[`${PLUGIN_NAME}/table-numeric-align`]:
|
|
85
|
-
[`${PLUGIN_NAME}/require-locale-number`]:
|
|
86
|
-
[`${PLUGIN_NAME}/field-width-grade`]:
|
|
87
|
+
[`${PLUGIN_NAME}/no-raw-html-control`]: ['error', { strict: true }],
|
|
88
|
+
[`${PLUGIN_NAME}/no-arbitrary-class`]: 'error',
|
|
89
|
+
[`${PLUGIN_NAME}/no-off-scale-spacing`]: ['error', { requirePrefix: true }],
|
|
90
|
+
[`${PLUGIN_NAME}/prefer-typo-preset`]: 'error',
|
|
91
|
+
[`${PLUGIN_NAME}/component-group-gap`]: 'error',
|
|
92
|
+
[`${PLUGIN_NAME}/table-numeric-align`]: 'error',
|
|
93
|
+
[`${PLUGIN_NAME}/require-locale-number`]: 'error',
|
|
94
|
+
[`${PLUGIN_NAME}/field-width-grade`]: 'error',
|
|
95
|
+
[`${PLUGIN_NAME}/table-column-width`]: 'error',
|
|
87
96
|
},
|
|
88
97
|
},
|
|
89
98
|
];
|
|
@@ -10,14 +10,12 @@
|
|
|
10
10
|
* 동적으로 조립되는 부분(변수·삼항의 식별자 등)은 정적 분석 대상이 아니므로 건너뛴다.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
const CLASS_ATTRS = new Set([
|
|
14
|
-
const CLASS_HELPERS = new Set([
|
|
13
|
+
const CLASS_ATTRS = new Set(['className', 'class']);
|
|
14
|
+
const CLASS_HELPERS = new Set(['cn', 'clsx', 'classNames', 'classnames', 'cva', 'twMerge']);
|
|
15
15
|
|
|
16
16
|
/** 문자열을 공백 기준 클래스 토큰으로 나눈다 (variant 접두어는 유지) */
|
|
17
17
|
export function tokenize(value) {
|
|
18
|
-
return String(value)
|
|
19
|
-
.split(/\s+/)
|
|
20
|
-
.filter(Boolean);
|
|
18
|
+
return String(value).split(/\s+/).filter(Boolean);
|
|
21
19
|
}
|
|
22
20
|
|
|
23
21
|
/**
|
|
@@ -38,16 +36,16 @@ function indexOfTopLevelColon(s) {
|
|
|
38
36
|
let depth = 0;
|
|
39
37
|
for (let i = 0; i < s.length; i++) {
|
|
40
38
|
const c = s[i];
|
|
41
|
-
if (c ===
|
|
42
|
-
else if (c ===
|
|
43
|
-
else if (c ===
|
|
39
|
+
if (c === '[') depth++;
|
|
40
|
+
else if (c === ']') depth--;
|
|
41
|
+
else if (c === ':' && depth === 0) return i;
|
|
44
42
|
}
|
|
45
43
|
return -1;
|
|
46
44
|
}
|
|
47
45
|
|
|
48
46
|
/** `!gap-12` / `-mt-8` 같은 접두 기호 제거 */
|
|
49
47
|
export function stripModifiers(token) {
|
|
50
|
-
return token.replace(/^!/,
|
|
48
|
+
return token.replace(/^!/, '').replace(/^-/, '');
|
|
51
49
|
}
|
|
52
50
|
|
|
53
51
|
/**
|
|
@@ -55,7 +53,7 @@ export function stripModifiers(token) {
|
|
|
55
53
|
* @returns {Array<{ token: string, node: import('estree').Node }>}
|
|
56
54
|
*/
|
|
57
55
|
export function collectClassTokens(attrNode) {
|
|
58
|
-
if (attrNode.type !==
|
|
56
|
+
if (attrNode.type !== 'JSXAttribute') return [];
|
|
59
57
|
const name = attrNode.name?.name;
|
|
60
58
|
if (!CLASS_ATTRS.has(name)) return [];
|
|
61
59
|
|
|
@@ -64,46 +62,46 @@ export function collectClassTokens(attrNode) {
|
|
|
64
62
|
for (const token of tokenize(raw)) out.push({ token, node });
|
|
65
63
|
};
|
|
66
64
|
|
|
67
|
-
const visit =
|
|
65
|
+
const visit = node => {
|
|
68
66
|
if (!node) return;
|
|
69
67
|
switch (node.type) {
|
|
70
|
-
case
|
|
71
|
-
if (typeof node.value ===
|
|
68
|
+
case 'Literal':
|
|
69
|
+
if (typeof node.value === 'string') push(node.value, node);
|
|
72
70
|
break;
|
|
73
|
-
case
|
|
71
|
+
case 'TemplateLiteral':
|
|
74
72
|
// 정적 부분만 본다. 보간(${}) 안쪽은 아래 표현식 방문으로 따로 처리.
|
|
75
|
-
for (const q of node.quasis) push(q.value.cooked ??
|
|
73
|
+
for (const q of node.quasis) push(q.value.cooked ?? '', node);
|
|
76
74
|
for (const e of node.expressions) visit(e);
|
|
77
75
|
break;
|
|
78
|
-
case
|
|
76
|
+
case 'JSXExpressionContainer':
|
|
79
77
|
visit(node.expression);
|
|
80
78
|
break;
|
|
81
|
-
case
|
|
79
|
+
case 'CallExpression': {
|
|
82
80
|
const callee = node.callee;
|
|
83
|
-
const fnName = callee?.type ===
|
|
81
|
+
const fnName = callee?.type === 'Identifier' ? callee.name : callee?.property?.name;
|
|
84
82
|
if (fnName && CLASS_HELPERS.has(fnName)) {
|
|
85
83
|
for (const arg of node.arguments) visit(arg);
|
|
86
84
|
}
|
|
87
85
|
break;
|
|
88
86
|
}
|
|
89
|
-
case
|
|
87
|
+
case 'ConditionalExpression':
|
|
90
88
|
visit(node.consequent);
|
|
91
89
|
visit(node.alternate);
|
|
92
90
|
break;
|
|
93
|
-
case
|
|
91
|
+
case 'LogicalExpression':
|
|
94
92
|
visit(node.left);
|
|
95
93
|
visit(node.right);
|
|
96
94
|
break;
|
|
97
|
-
case
|
|
95
|
+
case 'ArrayExpression':
|
|
98
96
|
for (const el of node.elements) visit(el);
|
|
99
97
|
break;
|
|
100
|
-
case
|
|
98
|
+
case 'ObjectExpression':
|
|
101
99
|
// clsx({ 'gap-12': cond }) 형태 — 키가 클래스다
|
|
102
100
|
for (const prop of node.properties) {
|
|
103
|
-
if (prop.type ===
|
|
104
|
-
if (prop.key.type ===
|
|
101
|
+
if (prop.type === 'Property' && prop.key) {
|
|
102
|
+
if (prop.key.type === 'Literal' && typeof prop.key.value === 'string') {
|
|
105
103
|
push(prop.key.value, prop.key);
|
|
106
|
-
} else if (prop.key.type ===
|
|
104
|
+
} else if (prop.key.type === 'Identifier' && !prop.computed) {
|
|
107
105
|
push(prop.key.name, prop.key);
|
|
108
106
|
}
|
|
109
107
|
}
|
|
@@ -58,29 +58,55 @@ export function isNonQuantityLabel(label) {
|
|
|
58
58
|
/** 객체 리터럴에서 프로퍼티 노드를 이름으로 찾는다 */
|
|
59
59
|
export function prop(objectNode, name) {
|
|
60
60
|
return objectNode.properties.find(
|
|
61
|
-
|
|
62
|
-
p.type ===
|
|
61
|
+
p =>
|
|
62
|
+
p.type === 'Property' &&
|
|
63
63
|
!p.computed &&
|
|
64
|
-
((p.key.type ===
|
|
65
|
-
(p.key.type ===
|
|
64
|
+
((p.key.type === 'Identifier' && p.key.name === name) ||
|
|
65
|
+
(p.key.type === 'Literal' && p.key.value === name)),
|
|
66
66
|
);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/** 문자열 리터럴 값 (아니면 undefined) */
|
|
70
70
|
export function literalString(node) {
|
|
71
|
-
return node?.value?.type ===
|
|
71
|
+
return node?.value?.type === 'Literal' && typeof node.value.value === 'string'
|
|
72
72
|
? node.value.value
|
|
73
73
|
: undefined;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
/**
|
|
77
|
+
* STableColumn 자리인지 — `asColumn` 보다 넓게, 값을 그리지 않는 스페이서 열까지 본다.
|
|
78
|
+
*
|
|
79
|
+
* `name` · `label` 만으로는 판정하지 않는다. 소비 앱의 검색 필터 필드·상세 모달 키-값 필드가
|
|
80
|
+
* 정확히 같은 모양(`{ name, label, type, ... }`)이라, 그것만 보면 잡히는 것의 대부분이 표와
|
|
81
|
+
* 무관한 객체가 된다 — 실측에서 265건 중 261건이 오탐이었다.
|
|
82
|
+
*
|
|
83
|
+
* 그래서 `STableColumn` 타입의 판별 유니온을 그대로 옮긴다 — 값을 그리는 열은 `field` 를,
|
|
84
|
+
* 값을 그리지 않는 스페이서 열은 `autoWidth` 를 반드시 갖는다. 둘 다 없으면 컬럼이 아니다.
|
|
85
|
+
* 폭 규칙이 봐야 하는 스페이서 열은 `autoWidth` 쪽으로 그대로 들어온다.
|
|
86
|
+
*
|
|
87
|
+
* 놓치는 것: `{ ...base, name, label }` 처럼 `field` 가 스프레드로 들어오는 컬럼. 정적으로는
|
|
88
|
+
* 검색 필터 필드와 구분되지 않아 보고하지 않는다 (`asColumn` 을 쓰는 다른 두 규칙과 같은 한계).
|
|
89
|
+
* @returns {{ nameProp, labelProp, columnName: string | undefined } | null}
|
|
90
|
+
*/
|
|
91
|
+
export function asColumnShape(node) {
|
|
92
|
+
const nameProp = prop(node, 'name');
|
|
93
|
+
const labelProp = prop(node, 'label');
|
|
94
|
+
if (!nameProp || !labelProp) return null;
|
|
95
|
+
if (!prop(node, 'field') && !prop(node, 'autoWidth')) return null;
|
|
96
|
+
// name 이 문자열 리터럴이 아니면 컬럼 정의로 단정하지 않는다 (일반 객체 오탐 방지)
|
|
97
|
+
const columnName = literalString(nameProp);
|
|
98
|
+
if (columnName === undefined) return null;
|
|
99
|
+
return { nameProp, labelProp, columnName };
|
|
100
|
+
}
|
|
101
|
+
|
|
76
102
|
/**
|
|
77
103
|
* STableColumn 형태인지 — name·label·field 셋을 모두 가진 객체만 컬럼으로 본다.
|
|
78
104
|
* @returns {{ nameProp, labelProp, label: string } | null}
|
|
79
105
|
*/
|
|
80
106
|
export function asColumn(node) {
|
|
81
|
-
const nameProp = prop(node,
|
|
82
|
-
const labelProp = prop(node,
|
|
83
|
-
if (!nameProp || !labelProp || !prop(node,
|
|
107
|
+
const nameProp = prop(node, 'name');
|
|
108
|
+
const labelProp = prop(node, 'label');
|
|
109
|
+
if (!nameProp || !labelProp || !prop(node, 'field')) return null;
|
|
84
110
|
|
|
85
111
|
const label = literalString(labelProp);
|
|
86
112
|
if (label === undefined) return null; // 동적 label 은 판단하지 않는다
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* AGENTS.md §2-2.
|
|
13
13
|
*/
|
|
14
|
-
import { collectClassTokens, stripVariants, stripModifiers } from
|
|
14
|
+
import { collectClassTokens, stripVariants, stripModifiers } from '../lib/class-names.mjs';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* 컴포넌트별 기대 간격 (px).
|
|
@@ -33,8 +33,8 @@ const GROUP_GAP = {
|
|
|
33
33
|
|
|
34
34
|
/** 이 컴포넌트들은 전용 그룹 컴포넌트가 따로 있다 */
|
|
35
35
|
const HAS_GROUP_COMPONENT = {
|
|
36
|
-
SRadio:
|
|
37
|
-
SRadioButton:
|
|
36
|
+
SRadio: 'SRadioGroup (direction 으로 간격을 맞춥니다)',
|
|
37
|
+
SRadioButton: 'SRadioGroup — 그룹 간격이 -1px(테두리 겹침)이라 직접 만들지 않습니다',
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
/** gap 유틸리티에서 px 값을 뽑는다. 토큰 var() 참조면 null(검사 제외) */
|
|
@@ -43,7 +43,7 @@ function readGap(tokens) {
|
|
|
43
43
|
const util = stripModifiers(stripVariants(token));
|
|
44
44
|
const m = util.match(/^gap-(.+)$/);
|
|
45
45
|
if (!m) continue;
|
|
46
|
-
if (m[1].startsWith(
|
|
46
|
+
if (m[1].startsWith('[')) return { skip: true }; // gap-[var(--...)] 등
|
|
47
47
|
// 간격 스케일은 `gap-sd-8` 형태다. 접두 없는 `gap-8` 은 Tailwind 기본 스케일이라
|
|
48
48
|
// 값이 다르므로(32px) no-off-scale-spacing 이 따로 잡는다 — 여기선 다루지 않는다.
|
|
49
49
|
const scaled = /^sd-(\d+)$/.exec(m[1]);
|
|
@@ -55,21 +55,19 @@ function readGap(tokens) {
|
|
|
55
55
|
/** JSX 자식 중 컴포넌트 엘리먼트만 (공백 텍스트 제외) */
|
|
56
56
|
function elementChildren(node) {
|
|
57
57
|
return (node.children ?? []).filter(
|
|
58
|
-
|
|
59
|
-
ch.type === "JSXElement" &&
|
|
60
|
-
ch.openingElement.name.type === "JSXIdentifier",
|
|
58
|
+
ch => ch.type === 'JSXElement' && ch.openingElement.name.type === 'JSXIdentifier',
|
|
61
59
|
);
|
|
62
60
|
}
|
|
63
61
|
|
|
64
|
-
const nameOf =
|
|
62
|
+
const nameOf = el => el.openingElement.name.name;
|
|
65
63
|
|
|
66
64
|
/** 자식들의 size prop 중 가장 먼저 나오는 리터럴 값 */
|
|
67
65
|
function sizeOf(children) {
|
|
68
66
|
for (const ch of children) {
|
|
69
67
|
const attr = ch.openingElement.attributes.find(
|
|
70
|
-
|
|
68
|
+
a => a.type === 'JSXAttribute' && a.name?.name === 'size',
|
|
71
69
|
);
|
|
72
|
-
if (attr?.value?.type ===
|
|
70
|
+
if (attr?.value?.type === 'Literal' && typeof attr.value.value === 'string') {
|
|
73
71
|
return attr.value.value;
|
|
74
72
|
}
|
|
75
73
|
}
|
|
@@ -78,33 +76,33 @@ function sizeOf(children) {
|
|
|
78
76
|
|
|
79
77
|
/** spec(number | {default, bySize}) 을 size 로 해석 */
|
|
80
78
|
function resolve(spec, size) {
|
|
81
|
-
if (typeof spec ===
|
|
79
|
+
if (typeof spec === 'number') return spec;
|
|
82
80
|
if (!spec) return undefined;
|
|
83
81
|
return (size && spec.bySize?.[size]) ?? spec.default;
|
|
84
82
|
}
|
|
85
83
|
|
|
86
84
|
export default {
|
|
87
85
|
meta: {
|
|
88
|
-
type:
|
|
86
|
+
type: 'problem',
|
|
89
87
|
docs: {
|
|
90
|
-
description:
|
|
88
|
+
description: '같은 컴포넌트를 나열할 때 컴포넌트별 그룹 간격 사용',
|
|
91
89
|
},
|
|
92
90
|
schema: [
|
|
93
91
|
{
|
|
94
|
-
type:
|
|
92
|
+
type: 'object',
|
|
95
93
|
properties: {
|
|
96
|
-
ignore: { type:
|
|
94
|
+
ignore: { type: 'array', items: { type: 'string' }, uniqueItems: true },
|
|
97
95
|
},
|
|
98
96
|
additionalProperties: false,
|
|
99
97
|
},
|
|
100
98
|
],
|
|
101
99
|
messages: {
|
|
102
100
|
wrongGap:
|
|
103
|
-
|
|
101
|
+
'{{component}} 를 {{dirLabel}} 배열할 때 간격은 `gap-sd-{{expected}}` 입니다{{actualLabel}}. (AGENTS.md §2-2)',
|
|
104
102
|
useGroupComponent:
|
|
105
|
-
|
|
103
|
+
'{{component}} 를 직접 flex 로 감싸지 마세요 — {{suggestion}}. (AGENTS.md §2-2)',
|
|
106
104
|
},
|
|
107
|
-
fixable:
|
|
105
|
+
fixable: 'code',
|
|
108
106
|
},
|
|
109
107
|
|
|
110
108
|
create(context) {
|
|
@@ -113,7 +111,8 @@ export default {
|
|
|
113
111
|
return {
|
|
114
112
|
JSXElement(node) {
|
|
115
113
|
const classAttr = node.openingElement.attributes.find(
|
|
116
|
-
|
|
114
|
+
a =>
|
|
115
|
+
a.type === 'JSXAttribute' && (a.name?.name === 'className' || a.name?.name === 'class'),
|
|
117
116
|
);
|
|
118
117
|
if (!classAttr) return;
|
|
119
118
|
|
|
@@ -121,23 +120,24 @@ export default {
|
|
|
121
120
|
const utils = tokens.map(({ token }) => stripModifiers(stripVariants(token)));
|
|
122
121
|
|
|
123
122
|
// flex 컨테이너가 아니면 대상이 아니다
|
|
124
|
-
if (!utils.includes(
|
|
123
|
+
if (!utils.includes('flex') && !utils.includes('inline-flex')) return;
|
|
125
124
|
// 양끝 분리는 gap 규칙 대상이 아니다 (하단 버튼 배치 등)
|
|
126
|
-
if (utils.some(
|
|
125
|
+
if (utils.some(u => u.startsWith('justify-between') || u.startsWith('justify-around')))
|
|
126
|
+
return;
|
|
127
127
|
|
|
128
128
|
const children = elementChildren(node);
|
|
129
129
|
if (children.length < 2) return;
|
|
130
130
|
|
|
131
131
|
// 같은 컴포넌트로만 이루어진 그룹만 판단한다
|
|
132
132
|
const first = nameOf(children[0]);
|
|
133
|
-
if (!children.every(
|
|
133
|
+
if (!children.every(ch => nameOf(ch) === first)) return;
|
|
134
134
|
if (ignore.has(first)) return;
|
|
135
135
|
|
|
136
136
|
// 전용 그룹 컴포넌트가 있으면 그쪽을 권한다
|
|
137
137
|
if (HAS_GROUP_COMPONENT[first]) {
|
|
138
138
|
context.report({
|
|
139
139
|
node: node.openingElement,
|
|
140
|
-
messageId:
|
|
140
|
+
messageId: 'useGroupComponent',
|
|
141
141
|
data: { component: first, suggestion: HAS_GROUP_COMPONENT[first] },
|
|
142
142
|
});
|
|
143
143
|
return;
|
|
@@ -146,7 +146,7 @@ export default {
|
|
|
146
146
|
const spec = GROUP_GAP[first];
|
|
147
147
|
if (!spec) return;
|
|
148
148
|
|
|
149
|
-
const vertical = utils.includes(
|
|
149
|
+
const vertical = utils.includes('flex-col') || utils.includes('flex-col-reverse');
|
|
150
150
|
const dirSpec = spec.both ?? (vertical ? spec.vertical : spec.horizontal);
|
|
151
151
|
const expected = resolve(dirSpec, sizeOf(children));
|
|
152
152
|
if (expected == null) return;
|
|
@@ -157,24 +157,26 @@ export default {
|
|
|
157
157
|
|
|
158
158
|
context.report({
|
|
159
159
|
node: node.openingElement,
|
|
160
|
-
messageId:
|
|
160
|
+
messageId: 'wrongGap',
|
|
161
161
|
data: {
|
|
162
162
|
component: first,
|
|
163
|
-
dirLabel: spec.both ?
|
|
163
|
+
dirLabel: spec.both ? '' : vertical ? '세로로' : '가로로',
|
|
164
164
|
expected: String(expected),
|
|
165
|
-
actualLabel:
|
|
165
|
+
actualLabel:
|
|
166
|
+
gap.value == null ? ' (지정되지 않았습니다)' : ` — 현재 gap-sd-${gap.value}`,
|
|
166
167
|
},
|
|
167
168
|
fix(fixer) {
|
|
168
169
|
// 기존 gap 유틸리티가 리터럴 문자열일 때만 안전하게 교체한다
|
|
169
170
|
if (gap.value == null) return null;
|
|
170
171
|
const literal = classAttr.value;
|
|
171
172
|
const raw =
|
|
172
|
-
literal?.type ===
|
|
173
|
+
literal?.type === 'Literal'
|
|
173
174
|
? literal
|
|
174
|
-
: literal?.type ===
|
|
175
|
+
: literal?.type === 'JSXExpressionContainer' &&
|
|
176
|
+
literal.expression.type === 'Literal'
|
|
175
177
|
? literal.expression
|
|
176
178
|
: null;
|
|
177
|
-
if (!raw || typeof raw.value !==
|
|
179
|
+
if (!raw || typeof raw.value !== 'string') return null;
|
|
178
180
|
const next = raw.value.replace(
|
|
179
181
|
new RegExp(`(^|\\s)gap-sd-${gap.value}(?=\\s|$)`),
|
|
180
182
|
`$1gap-sd-${expected}`,
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 세로 `SDivider` 의 높이를 `className="h-*"` 로 주면 정렬이 조용히 깨지는 것을 잡는다.
|
|
3
|
+
*
|
|
4
|
+
* 세로 분할선의 기본값은 `h-auto ... self-stretch` 라, 높이를 주지 않으면 부모 줄 높이를
|
|
5
|
+
* 그대로 채운다. 그런데 `align-self: stretch` 는 **교차축 크기가 auto 일 때만** 늘리므로
|
|
6
|
+
* className 으로 높이가 정해지는 순간 stretch 가 무효가 되고 flex-start 처럼 줄 맨 위에
|
|
7
|
+
* 붙는다. tailwind-merge 는 `h-auto` 만 교체하고 `self-stretch` 는 남기므로 경고도 없다.
|
|
8
|
+
*
|
|
9
|
+
* 높이와 정렬은 같이 정해져야 하는 값이라 컴포넌트가 함께 맡는다 — `height` prop 을 쓴다.
|
|
10
|
+
*
|
|
11
|
+
* <SDivider vertical height={20} /> // 높이 + self-center
|
|
12
|
+
* <SDivider vertical className="h-sd-20" /> // 위로 솟는다
|
|
13
|
+
*
|
|
14
|
+
* 정렬을 **직접 지정한 경우**(`self-center` `self-start` `my-auto` …)는 알고 쓰는 것으로
|
|
15
|
+
* 보고 잡지 않는다.
|
|
16
|
+
*
|
|
17
|
+
* AGENTS.md §3-6.
|
|
18
|
+
*/
|
|
19
|
+
import { collectClassTokens, stripVariants, stripModifiers } from '../lib/class-names.mjs';
|
|
20
|
+
|
|
21
|
+
/** 높이를 정하는 유틸리티인가 — `h-auto` 만 예외(기본값과 같아 stretch 가 살아 있다) */
|
|
22
|
+
function heightUtil(util) {
|
|
23
|
+
const m = /^h-(.+)$/.exec(util);
|
|
24
|
+
if (!m || m[1] === 'auto') return null;
|
|
25
|
+
return m[1];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** 교차축 정렬을 이미 직접 지정했는가 */
|
|
29
|
+
function alignsSelf(util) {
|
|
30
|
+
return /^self-/.test(util) || util === 'my-auto' || util === 'mt-auto' || util === 'mb-auto';
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 높이 유틸리티 값을 `height` prop 값으로 옮긴다. 옮길 수 없으면 null (수정 제안 없음).
|
|
35
|
+
* h-sd-20 → {20}
|
|
36
|
+
* h-[20px] → {20}
|
|
37
|
+
* h-[var(--x)] → "var(--x)"
|
|
38
|
+
*/
|
|
39
|
+
function toHeightProp(value) {
|
|
40
|
+
const scaled = /^sd-(\d+)$/.exec(value);
|
|
41
|
+
if (scaled) return `{${scaled[1]}}`;
|
|
42
|
+
const arbitrary = /^\[(.+)\]$/.exec(value);
|
|
43
|
+
if (!arbitrary) return null;
|
|
44
|
+
const inner = arbitrary[1].replace(/_/g, ' ');
|
|
45
|
+
const px = /^(\d+(?:\.\d+)?)px$/.exec(inner);
|
|
46
|
+
if (px) return `{${px[1]}}`;
|
|
47
|
+
if (inner.includes('"')) return null;
|
|
48
|
+
return `"${inner}"`;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const isClassAttr = a =>
|
|
52
|
+
a.type === 'JSXAttribute' && (a.name?.name === 'className' || a.name?.name === 'class');
|
|
53
|
+
|
|
54
|
+
export default {
|
|
55
|
+
meta: {
|
|
56
|
+
type: 'problem',
|
|
57
|
+
docs: {
|
|
58
|
+
description: '세로 SDivider 의 높이는 className 이 아니라 height prop 으로 지정',
|
|
59
|
+
},
|
|
60
|
+
schema: [],
|
|
61
|
+
messages: {
|
|
62
|
+
useHeightProp:
|
|
63
|
+
'세로 SDivider 의 높이는 `height` prop 으로 주세요{{suggestion}} — `className` 으로 주면 `align-self: stretch` 가 무효가 되어 선이 줄 맨 위에 붙습니다. (AGENTS.md §3-6)',
|
|
64
|
+
},
|
|
65
|
+
fixable: 'code',
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
create(context) {
|
|
69
|
+
return {
|
|
70
|
+
JSXOpeningElement(node) {
|
|
71
|
+
if (node.name.type !== 'JSXIdentifier' || node.name.name !== 'SDivider') return;
|
|
72
|
+
|
|
73
|
+
const attrs = node.attributes;
|
|
74
|
+
const named = n => attrs.find(a => a.type === 'JSXAttribute' && a.name?.name === n);
|
|
75
|
+
|
|
76
|
+
// 세로 분할선만 대상. `vertical={expr}` 처럼 값이 정적이지 않으면 판단하지 않는다.
|
|
77
|
+
const vertical = named('vertical');
|
|
78
|
+
if (!vertical) return;
|
|
79
|
+
if (vertical.value !== null && vertical.value?.expression?.value !== true) return;
|
|
80
|
+
|
|
81
|
+
// 이미 height prop 을 쓰고 있으면 컴포넌트가 정렬까지 맡는다
|
|
82
|
+
if (named('height')) return;
|
|
83
|
+
|
|
84
|
+
const classAttr = attrs.find(isClassAttr);
|
|
85
|
+
if (!classAttr) return;
|
|
86
|
+
|
|
87
|
+
const tokens = collectClassTokens(classAttr);
|
|
88
|
+
let height = null;
|
|
89
|
+
for (const { token } of tokens) {
|
|
90
|
+
const util = stripModifiers(stripVariants(token));
|
|
91
|
+
if (alignsSelf(util)) return; // 정렬을 직접 정했다 — 의도한 것으로 본다
|
|
92
|
+
// variant 가 붙은 높이(`md:h-sd-20`)는 prop 으로 옮길 수 없어 판단에서 뺀다
|
|
93
|
+
if (height === null && token === util) height = heightUtil(util);
|
|
94
|
+
}
|
|
95
|
+
if (height === null) return;
|
|
96
|
+
|
|
97
|
+
const propValue = toHeightProp(height);
|
|
98
|
+
|
|
99
|
+
context.report({
|
|
100
|
+
node,
|
|
101
|
+
messageId: 'useHeightProp',
|
|
102
|
+
data: { suggestion: propValue ? ` (\`height=${propValue}\`)` : '' },
|
|
103
|
+
fix(fixer) {
|
|
104
|
+
if (!propValue) return null;
|
|
105
|
+
// className 이 통짜 문자열일 때만 안전하게 손댄다 (cn()·템플릿 리터럴은 제외)
|
|
106
|
+
const raw =
|
|
107
|
+
classAttr.value?.type === 'Literal'
|
|
108
|
+
? classAttr.value
|
|
109
|
+
: classAttr.value?.type === 'JSXExpressionContainer' &&
|
|
110
|
+
classAttr.value.expression.type === 'Literal'
|
|
111
|
+
? classAttr.value.expression
|
|
112
|
+
: null;
|
|
113
|
+
if (!raw || typeof raw.value !== 'string') return null;
|
|
114
|
+
|
|
115
|
+
const rest = raw.value
|
|
116
|
+
.split(/\s+/)
|
|
117
|
+
.filter(Boolean)
|
|
118
|
+
.filter(t => t !== `h-${height}`);
|
|
119
|
+
if (rest.length === raw.value.split(/\s+/).filter(Boolean).length) return null;
|
|
120
|
+
|
|
121
|
+
const fixes = [fixer.insertTextAfter(vertical, ` height=${propValue}`)];
|
|
122
|
+
if (rest.length > 0) {
|
|
123
|
+
fixes.push(fixer.replaceText(raw, `"${rest.join(' ')}"`));
|
|
124
|
+
} else {
|
|
125
|
+
// 속성만 지우면 공백이 두 칸 남는다 — 앞 공백까지 함께 지운다
|
|
126
|
+
const src = context.sourceCode ?? context.getSourceCode();
|
|
127
|
+
const [start, end] = classAttr.range;
|
|
128
|
+
const from = /\s/.test(src.text[start - 1]) ? start - 1 : start;
|
|
129
|
+
fixes.push(fixer.removeRange([from, end]));
|
|
130
|
+
}
|
|
131
|
+
return fixes;
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
},
|
|
137
|
+
};
|