sellmate-design-system-react 9.0.0-beta.0 → 9.0.0-beta.100
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 +4263 -286
- package/README.md +126 -15
- 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 +123 -0
- package/dist/components/SBarChart/SBarChart.d.ts +106 -0
- package/dist/components/SBarChart/barChart.config.d.ts +85 -0
- package/dist/components/SBarChart/index.d.ts +2 -0
- package/dist/components/SBarcodeInput/README.md +16 -4
- package/dist/components/SBarcodeInput/SBarcodeInput.d.ts +25 -3
- package/dist/components/SButton/README.md +76 -3
- package/dist/components/SButton/SButton.d.ts +29 -5
- package/dist/components/SButton/button.config.d.ts +22 -13
- package/dist/components/SButton/index.d.ts +1 -1
- package/dist/components/SCalendar/README.md +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 +11 -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 -11
- package/dist/components/SChipFilter/SChipFilter.d.ts +175 -59
- 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 +15 -1
- package/dist/components/SCircleProgress/SCircleProgress.d.ts +16 -2
- 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 +63 -4
- package/dist/components/SDatePicker/SDatePicker.d.ts +84 -6
- package/dist/components/SDatePicker/index.d.ts +1 -1
- 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 +30 -1
- package/dist/components/SDropdownButton/SDropdownButton.d.ts +3 -1
- package/dist/components/SDropdownButton/index.d.ts +1 -1
- package/dist/components/SEditor/EditorBody.d.ts +48 -0
- package/dist/components/SEditor/EditorToolbar.d.ts +93 -0
- package/dist/components/SEditor/README.md +207 -0
- package/dist/components/SEditor/SEditor.d.ts +128 -0
- package/dist/components/SEditor/editor-icons.d.ts +63 -0
- package/dist/components/SEditor/editor.config.d.ts +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 +40 -4
- package/dist/components/SField/SField.d.ts +69 -6
- 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 +34 -1
- 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 +24 -5
- package/dist/components/SGnb/index.d.ts +1 -1
- package/dist/components/SGnbSystem/README.md +190 -0
- package/dist/components/SGnbSystem/SGnbSystem.d.ts +179 -0
- package/dist/components/SGnbSystem/gnbSystem.config.d.ts +124 -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 +27 -1
- package/dist/components/SIcon/SIcon.d.ts +2 -2
- package/dist/components/SIcon/icons.gen.d.ts +20 -1
- package/dist/components/SImage/README.md +66 -0
- package/dist/components/SImage/SImage.d.ts +44 -0
- package/dist/components/SImage/index.d.ts +1 -0
- package/dist/components/SInput/README.md +10 -4
- package/dist/components/SInput/SInput.d.ts +17 -5
- package/dist/components/SKeyValueTable/README.md +89 -0
- package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +37 -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 +149 -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 +132 -0
- package/dist/components/SLineChart/SLineChart.d.ts +115 -0
- package/dist/components/SLineChart/index.d.ts +1 -0
- package/dist/components/SLineChart/lineChart.config.d.ts +94 -0
- package/dist/components/SLinearProgress/README.md +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 -3
- package/dist/components/SList/SList.d.ts +7 -5
- 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 +12 -4
- 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 +69 -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 +21 -8
- package/dist/components/SNumberInput/SNumberInput.d.ts +49 -7
- package/dist/components/SPage/README.md +107 -5
- package/dist/components/SPage/SPage.d.ts +50 -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 +34 -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 +81 -0
- package/dist/components/SRadioCard/SRadioCard.d.ts +34 -0
- package/dist/components/SRadioCard/SRadioCardGroup.d.ts +38 -0
- package/dist/components/SRadioCard/index.d.ts +2 -0
- package/dist/components/SScrollArea/README.md +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 +45 -20
- package/dist/components/SSectionHeaderCard/SSectionHeaderCard.d.ts +40 -14
- package/dist/components/SSectionHeaderCard/index.d.ts +1 -1
- package/dist/components/SSelect/README.md +70 -9
- package/dist/components/SSelect/SSelect.d.ts +159 -17
- package/dist/components/SSelect/index.d.ts +1 -1
- package/dist/components/SSelect/select.config.d.ts +51 -4
- 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/SStepper/stepper.config.d.ts +9 -3
- 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 +157 -20
- package/dist/components/STable/STable.d.ts +380 -47
- 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 -2
- package/dist/components/STabs/STabs.d.ts +3 -5
- package/dist/components/STabs/index.d.ts +1 -1
- package/dist/components/STabs/tabs.config.d.ts +4 -10
- package/dist/components/STag/README.md +63 -0
- package/dist/components/STag/STag.d.ts +3 -1
- package/dist/components/STag/tag.config.d.ts +11 -10
- 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 +20 -3
- package/dist/components/STimePicker/STimePicker.d.ts +37 -11
- package/dist/components/STimePicker/TimeListbox.d.ts +21 -0
- package/dist/components/STimePicker/timepicker.config.d.ts +10 -0
- package/dist/components/STimeRangePicker/README.md +33 -4
- package/dist/components/STimeRangePicker/STimeRangePicker.d.ts +40 -7
- 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 +9 -0
- package/dist/components/SToggle/SToggle.d.ts +4 -1
- 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 +46 -4
- package/dist/components/STree/STree.d.ts +25 -7
- package/dist/components/STree/STree.examples.d.ts +2 -0
- package/dist/components/STree/index.d.ts +1 -1
- package/dist/components/STreeTable/README.md +49 -0
- package/dist/components/STreeTable/STreeTable.d.ts +70 -0
- package/dist/components/STreeTable/STreeTable.examples.d.ts +39 -0
- package/dist/components/STreeTable/index.d.ts +1 -0
- package/dist/docs/Gallery.d.ts +9 -0
- package/dist/docs/RecipeGallery.d.ts +13 -0
- package/dist/docs/gallery-previews.d.ts +24 -0
- package/dist/fonts/LICENSE.txt +94 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.0.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.1.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.10.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.11.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.12.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.13.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.14.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.15.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.16.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.17.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.18.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.19.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.2.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.20.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.21.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.22.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.23.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.24.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.25.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.26.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.27.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.28.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.29.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.3.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.30.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.31.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.32.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.33.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.34.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.35.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.36.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.37.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.38.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.39.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.4.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.40.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.41.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.42.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.43.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.44.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.45.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.46.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.47.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.48.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.49.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.5.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.50.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.51.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.52.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.53.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.54.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.55.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.56.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.57.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.58.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.59.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.6.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.60.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.61.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.62.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.63.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.64.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.65.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.66.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.67.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.68.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.69.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.7.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.70.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.71.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.72.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.73.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.74.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.75.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.76.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.77.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.78.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.79.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.8.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.80.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.81.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.82.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.83.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.84.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.85.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.86.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.87.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.88.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.89.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.9.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.90.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.91.woff2 +0 -0
- package/dist/index.cjs +24511 -10545
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +27 -0
- package/dist/index.js +24419 -10550
- package/dist/index.js.map +1 -1
- package/dist/lib/autofill.d.ts +3 -5
- package/dist/lib/chart/cartesian.d.ts +54 -0
- package/dist/lib/chart/category-labels.d.ts +37 -0
- package/dist/lib/chart/frame.d.ts +21 -0
- package/dist/lib/chart/hover-dim.d.ts +19 -0
- package/dist/lib/chart/legend.d.ts +21 -0
- package/dist/lib/chart/palette.d.ts +28 -0
- package/dist/lib/chart/radial.d.ts +99 -0
- package/dist/lib/chart/scale.d.ts +26 -0
- package/dist/lib/chart/tooltip.d.ts +60 -0
- package/dist/lib/chart/types.d.ts +29 -0
- package/dist/lib/chart/use-element-size.d.ts +42 -0
- package/dist/lib/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/list-box-item.d.ts +16 -0
- package/dist/lib/mode-listbox.d.ts +10 -0
- package/dist/lib/overlay-scrollbar.d.ts +32 -0
- package/dist/lib/row-metrics.d.ts +61 -0
- package/dist/lib/row-motion.d.ts +56 -0
- package/dist/lib/scrollbar.d.ts +1 -2
- package/dist/lib/story-docs.d.ts +19 -3
- package/dist/lib/tree-row.d.ts +103 -0
- package/dist/lib/truncated-value-tooltip.d.ts +18 -0
- package/dist/llms-full.txt +9156 -896
- package/dist/llms.txt +4311 -303
- 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 +4264 -362
- package/dist/theme.css +812 -64
- package/eslint/index.mjs +45 -31
- 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.d.mts +41 -0
- package/eslint/rules/field-width-grade.mjs +311 -0
- 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 +27 -6
|
@@ -16,51 +16,70 @@
|
|
|
16
16
|
*
|
|
17
17
|
* AGENTS.md §2-2.
|
|
18
18
|
*/
|
|
19
|
-
import { collectClassTokens, stripVariants, stripModifiers } from
|
|
20
|
-
import { SPACING } from
|
|
19
|
+
import { collectClassTokens, stripVariants, stripModifiers } from '../lib/class-names.mjs';
|
|
20
|
+
import { SPACING } from '../scale.gen.mjs';
|
|
21
21
|
|
|
22
22
|
/** 값이 순수하게 간격 스케일에서 오는 유틸리티 접두어만 대상으로 한다 */
|
|
23
23
|
const SPACING_PREFIXES = [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
'gap-x',
|
|
25
|
+
'gap-y',
|
|
26
|
+
'gap',
|
|
27
|
+
'space-x',
|
|
28
|
+
'space-y',
|
|
29
|
+
'px',
|
|
30
|
+
'py',
|
|
31
|
+
'pt',
|
|
32
|
+
'pr',
|
|
33
|
+
'pb',
|
|
34
|
+
'pl',
|
|
35
|
+
'ps',
|
|
36
|
+
'pe',
|
|
37
|
+
'p',
|
|
38
|
+
'mx',
|
|
39
|
+
'my',
|
|
40
|
+
'mt',
|
|
41
|
+
'mr',
|
|
42
|
+
'mb',
|
|
43
|
+
'ml',
|
|
44
|
+
'ms',
|
|
45
|
+
'me',
|
|
46
|
+
'm',
|
|
28
47
|
];
|
|
29
48
|
|
|
30
49
|
const ALLOWED = new Set([0, ...SPACING]);
|
|
31
50
|
const MAX = Math.max(...SPACING);
|
|
32
51
|
|
|
33
52
|
/** Tailwind 기본 스케일에서 `p-<n>` 이 실제로 만드는 px (`--spacing` = 0.25rem) */
|
|
34
|
-
const RENDERED_PX =
|
|
53
|
+
const RENDERED_PX = value => value * 4;
|
|
35
54
|
|
|
36
|
-
const escapeRegExp =
|
|
55
|
+
const escapeRegExp = s => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
37
56
|
|
|
38
57
|
/**
|
|
39
58
|
* 토큰 시작 경계 — 앞은 공백이거나 문자열 따옴표(= 문자열의 시작)여야 한다.
|
|
40
59
|
* `(?<![\w-])` 만 쓰면 `md:p-4 p-4` 에서 `p-4` 를 찾을 때 variant 안쪽(`md:` 뒤)이
|
|
41
60
|
* 먼저 걸려 엉뚱한 클래스를 고친다.
|
|
42
61
|
*/
|
|
43
|
-
const TOKEN_START =
|
|
62
|
+
const TOKEN_START = '(?<![^\\s\'"`])';
|
|
44
63
|
|
|
45
64
|
export default {
|
|
46
65
|
meta: {
|
|
47
|
-
type:
|
|
66
|
+
type: 'problem',
|
|
48
67
|
docs: {
|
|
49
|
-
description:
|
|
68
|
+
description: '간격 유틸리티는 sd- 접두가 붙은 토큰 스케일 값만 사용',
|
|
50
69
|
},
|
|
51
70
|
// 스케일 밖 값(`gap-sd-13`)에는 fix 를 내지 않는다. `unsafeFix` 를 켠 팀의
|
|
52
71
|
// 접두 누락 수정에만 쓰이지만, 선언은 정적이어야 하므로 여기 남는다.
|
|
53
|
-
fixable:
|
|
72
|
+
fixable: 'code',
|
|
54
73
|
hasSuggestions: true,
|
|
55
74
|
schema: [
|
|
56
75
|
{
|
|
57
|
-
type:
|
|
76
|
+
type: 'object',
|
|
58
77
|
properties: {
|
|
59
78
|
/**
|
|
60
79
|
* 접두 없는 간격 유틸리티(`p-16`)도 잡는다. 기본 false.
|
|
61
80
|
* 기본값에서는 두 해석(`p-sd-16` = 16px / 현재 값 유지)을 제안으로만 낸다.
|
|
62
81
|
*/
|
|
63
|
-
requirePrefix: { type:
|
|
82
|
+
requirePrefix: { type: 'boolean' },
|
|
64
83
|
/**
|
|
65
84
|
* 접두 누락을 "클래스의 숫자 = px" 로 단정하고 `p-16` → `p-sd-16` 자동 수정한다.
|
|
66
85
|
*
|
|
@@ -68,27 +87,27 @@ export default {
|
|
|
68
87
|
* 켜면 여백이 1/4 로 줄어든다. 이전 버전의 디자인 시스템 스케일을 쓰던 앱을
|
|
69
88
|
* 한 번에 옮길 때만 켜고, 마이그레이션이 끝나면 다시 끈다.
|
|
70
89
|
*/
|
|
71
|
-
unsafeFix: { type:
|
|
90
|
+
unsafeFix: { type: 'boolean' },
|
|
72
91
|
},
|
|
73
92
|
additionalProperties: false,
|
|
74
93
|
},
|
|
75
94
|
],
|
|
76
95
|
messages: {
|
|
77
96
|
offScale:
|
|
78
|
-
|
|
97
|
+
'`{{token}}` 의 {{value}} 는 간격 스케일에 없어 스타일이 적용되지 않습니다. 가까운 값: {{nearest}}. (AGENTS.md §2-2)',
|
|
79
98
|
// 접두 누락 — 어느 해석이 스케일에 있느냐로 갈린다.
|
|
80
99
|
// `p-16` 은 지금 64px 이므로 "16px 의도" 와 "64px 유지" 가 서로 다른 결과다.
|
|
81
100
|
missingPrefixBoth:
|
|
82
|
-
|
|
101
|
+
'`{{token}}` 은 현재 {{actual}}px 입니다 (Tailwind 기본 스케일). {{value}}px 을 의도했다면 → `{{asLiteral}}` · {{actual}}px 을 유지하려면 → `{{asRendered}}` (AGENTS.md §2-2)',
|
|
83
102
|
missingPrefixLiteral:
|
|
84
|
-
|
|
103
|
+
'`{{token}}` 은 현재 {{actual}}px 입니다 (Tailwind 기본 스케일). {{value}}px 을 의도했다면 → `{{asLiteral}}`. {{actual}}px 유지는 간격 스케일에 값이 없습니다. {{fallback}} (AGENTS.md §2-2)',
|
|
85
104
|
missingPrefixRendered:
|
|
86
|
-
|
|
105
|
+
'`{{token}}` 은 현재 {{actual}}px 입니다 (Tailwind 기본 스케일). {{actual}}px 을 유지하려면 → `{{asRendered}}`. {{value}}px 은 간격 스케일에 없습니다. (AGENTS.md §2-2)',
|
|
87
106
|
missingPrefixNone:
|
|
88
|
-
|
|
107
|
+
'`{{token}}` 은 현재 {{actual}}px 입니다 (Tailwind 기본 스케일). {{value}}px·{{actual}}px 둘 다 간격 스케일에 없습니다. {{fallback}} (AGENTS.md §2-2)',
|
|
89
108
|
// 제안(suggestion) 설명 — 편집기 목록에 그대로 뜬다
|
|
90
|
-
useLiteral:
|
|
91
|
-
useRendered:
|
|
109
|
+
useLiteral: '`{{to}}` 적용 — 숫자를 px 로 해석 ({{actual}}px → {{value}}px, 여백이 바뀝니다)',
|
|
110
|
+
useRendered: '`{{to}}` 적용 — 현재 {{actual}}px 유지',
|
|
92
111
|
},
|
|
93
112
|
},
|
|
94
113
|
|
|
@@ -98,7 +117,7 @@ export default {
|
|
|
98
117
|
const unsafeFix = context.options[0]?.unsafeFix ?? false;
|
|
99
118
|
|
|
100
119
|
/** 토큰 문자열을 소스에서 찾아 치환하는 fixer (없으면 null) */
|
|
101
|
-
const replaceToken = (valueNode, token, fixed) =>
|
|
120
|
+
const replaceToken = (valueNode, token, fixed) => fixer => {
|
|
102
121
|
const text = sourceCode.getText(valueNode);
|
|
103
122
|
const idx = text.search(new RegExp(`${TOKEN_START}${escapeRegExp(token)}(?![\\w-])`));
|
|
104
123
|
if (idx === -1) return null;
|
|
@@ -107,14 +126,17 @@ export default {
|
|
|
107
126
|
};
|
|
108
127
|
|
|
109
128
|
/** 스케일을 value 와의 거리순으로 (동률이면 작은 값 먼저) */
|
|
110
|
-
const byDistance =
|
|
129
|
+
const byDistance = value =>
|
|
111
130
|
[...ALLOWED].sort((a, b) => Math.abs(a - value) - Math.abs(b - value) || a - b);
|
|
112
131
|
|
|
113
132
|
/** 가장 가까운 값 하나 — 거리순 배열을 다시 정렬하면 안 된다 (64 → 62 지 60 이 아니다) */
|
|
114
|
-
const nearestOne =
|
|
133
|
+
const nearestOne = value => byDistance(value)[0];
|
|
115
134
|
|
|
116
135
|
/** 스케일에서 value 에 가장 가까운 값 두 개 (표시용이라 오름차순) */
|
|
117
|
-
const nearestOf =
|
|
136
|
+
const nearestOf = value =>
|
|
137
|
+
byDistance(value)
|
|
138
|
+
.slice(0, 2)
|
|
139
|
+
.sort((a, b) => a - b);
|
|
118
140
|
|
|
119
141
|
/**
|
|
120
142
|
* 대응 토큰이 없을 때의 안내. 기준은 클래스에 적힌 숫자가 아니라 **실제 렌더 px** 다.
|
|
@@ -133,7 +155,7 @@ export default {
|
|
|
133
155
|
for (const { token, node: valueNode } of collectClassTokens(node)) {
|
|
134
156
|
const util = stripModifiers(stripVariants(token));
|
|
135
157
|
|
|
136
|
-
const prefix = SPACING_PREFIXES.find(
|
|
158
|
+
const prefix = SPACING_PREFIXES.find(p => util.startsWith(`${p}-`));
|
|
137
159
|
if (!prefix) continue;
|
|
138
160
|
|
|
139
161
|
const raw = util.slice(prefix.length + 1);
|
|
@@ -150,7 +172,7 @@ export default {
|
|
|
150
172
|
|
|
151
173
|
const rendered = RENDERED_PX(value);
|
|
152
174
|
/** `md:p-4` → `md:p-sd-16` — variant·부호 접두는 그대로 두고 뒤만 갈아낀다 */
|
|
153
|
-
const rewrite =
|
|
175
|
+
const rewrite = px =>
|
|
154
176
|
token.replace(
|
|
155
177
|
new RegExp(`${escapeRegExp(`${prefix}-${raw}`)}$`),
|
|
156
178
|
`${prefix}-sd-${px}`,
|
|
@@ -165,22 +187,22 @@ export default {
|
|
|
165
187
|
token,
|
|
166
188
|
value: raw,
|
|
167
189
|
actual: String(rendered),
|
|
168
|
-
asLiteral: asLiteral ??
|
|
169
|
-
asRendered: asRendered ??
|
|
190
|
+
asLiteral: asLiteral ?? '',
|
|
191
|
+
asRendered: asRendered ?? '',
|
|
170
192
|
fallback: fallbackFor(prefix, rendered),
|
|
171
193
|
};
|
|
172
194
|
|
|
173
195
|
const suggest = [];
|
|
174
196
|
if (asLiteral) {
|
|
175
197
|
suggest.push({
|
|
176
|
-
messageId:
|
|
198
|
+
messageId: 'useLiteral',
|
|
177
199
|
data: { to: asLiteral, actual: String(rendered), value: raw },
|
|
178
200
|
fix: replaceToken(valueNode, token, asLiteral),
|
|
179
201
|
});
|
|
180
202
|
}
|
|
181
203
|
if (asRendered) {
|
|
182
204
|
suggest.push({
|
|
183
|
-
messageId:
|
|
205
|
+
messageId: 'useRendered',
|
|
184
206
|
data: { to: asRendered, actual: String(rendered) },
|
|
185
207
|
fix: replaceToken(valueNode, token, asRendered),
|
|
186
208
|
});
|
|
@@ -188,11 +210,11 @@ export default {
|
|
|
188
210
|
|
|
189
211
|
const messageId = asLiteral
|
|
190
212
|
? asRendered
|
|
191
|
-
?
|
|
192
|
-
:
|
|
213
|
+
? 'missingPrefixBoth'
|
|
214
|
+
: 'missingPrefixLiteral'
|
|
193
215
|
: asRendered
|
|
194
|
-
?
|
|
195
|
-
:
|
|
216
|
+
? 'missingPrefixRendered'
|
|
217
|
+
: 'missingPrefixNone';
|
|
196
218
|
|
|
197
219
|
context.report({
|
|
198
220
|
node: valueNode,
|
|
@@ -200,9 +222,7 @@ export default {
|
|
|
200
222
|
data,
|
|
201
223
|
suggest,
|
|
202
224
|
// 마이그레이션용 옵트인 — "숫자 = px" 를 단정하므로 여백 값이 바뀐다
|
|
203
|
-
...(unsafeFix && asLiteral
|
|
204
|
-
? { fix: replaceToken(valueNode, token, asLiteral) }
|
|
205
|
-
: {}),
|
|
225
|
+
...(unsafeFix && asLiteral ? { fix: replaceToken(valueNode, token, asLiteral) } : {}),
|
|
206
226
|
});
|
|
207
227
|
continue;
|
|
208
228
|
}
|
|
@@ -212,8 +232,8 @@ export default {
|
|
|
212
232
|
|
|
213
233
|
context.report({
|
|
214
234
|
node: valueNode,
|
|
215
|
-
messageId:
|
|
216
|
-
data: { token, value: String(value), nearest: nearestOf(value).join(
|
|
235
|
+
messageId: 'offScale',
|
|
236
|
+
data: { token, value: String(value), nearest: nearestOf(value).join(' / ') },
|
|
217
237
|
});
|
|
218
238
|
}
|
|
219
239
|
},
|
|
@@ -7,17 +7,17 @@
|
|
|
7
7
|
* 기본 대상 — 대응 컴포넌트가 명확해 오탐 여지가 거의 없는 요소.
|
|
8
8
|
*/
|
|
9
9
|
const REPLACEMENTS = {
|
|
10
|
-
button:
|
|
11
|
-
input:
|
|
12
|
-
select:
|
|
13
|
-
textarea:
|
|
14
|
-
table:
|
|
15
|
-
form:
|
|
16
|
-
dialog:
|
|
17
|
-
hr:
|
|
18
|
-
details:
|
|
19
|
-
summary:
|
|
20
|
-
progress:
|
|
10
|
+
button: 'SButton / SGhostButton / SDropdownButton / STextLink',
|
|
11
|
+
input: 'SInput / SNumberInput / SCheckbox / SRadio / SFilePicker',
|
|
12
|
+
select: 'SSelect',
|
|
13
|
+
textarea: 'STextarea',
|
|
14
|
+
table: 'STable / SKeyValueTable',
|
|
15
|
+
form: 'SForm',
|
|
16
|
+
dialog: 'SModal.create(...) / SModal.confirm(...) / SPopup',
|
|
17
|
+
hr: 'SDivider',
|
|
18
|
+
details: 'SExpansionItem',
|
|
19
|
+
summary: 'SExpansionItem',
|
|
20
|
+
progress: 'SLinearProgress / SCircleProgress',
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -27,53 +27,51 @@ const REPLACEMENTS = {
|
|
|
27
27
|
* - label : DS 밖 컨트롤의 접근성 레이블
|
|
28
28
|
*/
|
|
29
29
|
const STRICT_REPLACEMENTS = {
|
|
30
|
-
ul:
|
|
31
|
-
ol:
|
|
32
|
-
li:
|
|
33
|
-
svg:
|
|
34
|
-
label:
|
|
30
|
+
ul: 'SList + SListItem',
|
|
31
|
+
ol: 'SList + SListItem',
|
|
32
|
+
li: 'SListItem',
|
|
33
|
+
svg: 'SIcon',
|
|
34
|
+
label: 'SField 의 label prop',
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
/** 시각 요소가 없어 대체 컴포넌트가 없는 input 타입 */
|
|
38
|
-
const EXEMPT_INPUT_TYPES = new Set([
|
|
38
|
+
const EXEMPT_INPUT_TYPES = new Set(['hidden']);
|
|
39
39
|
|
|
40
40
|
/** JSX 속성에서 리터럴 문자열 값을 읽는다 (동적 값이면 undefined) */
|
|
41
41
|
function literalAttr(node, name) {
|
|
42
|
-
const attr = node.attributes.find(
|
|
43
|
-
(a) => a.type === "JSXAttribute" && a.name?.name === name,
|
|
44
|
-
);
|
|
42
|
+
const attr = node.attributes.find(a => a.type === 'JSXAttribute' && a.name?.name === name);
|
|
45
43
|
const v = attr?.value;
|
|
46
|
-
if (v?.type ===
|
|
44
|
+
if (v?.type === 'Literal' && typeof v.value === 'string') return v.value;
|
|
47
45
|
return undefined;
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
/** 전역 함수 → 권장 대체 */
|
|
51
49
|
const GLOBAL_CALLS = {
|
|
52
|
-
alert:
|
|
53
|
-
confirm:
|
|
50
|
+
alert: 'SToast / SModal.confirm(...)',
|
|
51
|
+
confirm: 'SModal.confirm(...)',
|
|
54
52
|
};
|
|
55
53
|
|
|
56
54
|
export default {
|
|
57
55
|
meta: {
|
|
58
|
-
type:
|
|
56
|
+
type: 'problem',
|
|
59
57
|
docs: {
|
|
60
|
-
description:
|
|
58
|
+
description: '디자인 시스템 컴포넌트가 있는 생 HTML 컨트롤 사용 금지',
|
|
61
59
|
},
|
|
62
60
|
schema: [
|
|
63
61
|
{
|
|
64
|
-
type:
|
|
62
|
+
type: 'object',
|
|
65
63
|
properties: {
|
|
66
64
|
/** 예외로 허용할 요소명 (예: 로고용 svg) */
|
|
67
|
-
allow: { type:
|
|
65
|
+
allow: { type: 'array', items: { type: 'string' }, uniqueItems: true },
|
|
68
66
|
/** ul·ol·li·svg·label 까지 검사 (정당한 사용처가 있어 기본은 off) */
|
|
69
|
-
strict: { type:
|
|
67
|
+
strict: { type: 'boolean' },
|
|
70
68
|
},
|
|
71
69
|
additionalProperties: false,
|
|
72
70
|
},
|
|
73
71
|
],
|
|
74
72
|
messages: {
|
|
75
|
-
rawElement:
|
|
76
|
-
rawCall:
|
|
73
|
+
rawElement: '<{{name}}> 대신 {{replacement}} 를 사용하세요. (AGENTS.md §1-1)',
|
|
74
|
+
rawCall: '{{name}}() 대신 {{replacement}} 를 사용하세요. (AGENTS.md §1-1)',
|
|
77
75
|
},
|
|
78
76
|
},
|
|
79
77
|
|
|
@@ -86,7 +84,7 @@ export default {
|
|
|
86
84
|
|
|
87
85
|
return {
|
|
88
86
|
JSXOpeningElement(node) {
|
|
89
|
-
if (node.name.type !==
|
|
87
|
+
if (node.name.type !== 'JSXIdentifier') return;
|
|
90
88
|
const name = node.name.name;
|
|
91
89
|
// 컴포넌트(대문자 시작)는 대상이 아니다
|
|
92
90
|
if (name[0] !== name[0].toLowerCase()) return;
|
|
@@ -96,21 +94,25 @@ export default {
|
|
|
96
94
|
if (!replacement) return;
|
|
97
95
|
|
|
98
96
|
// <input type="hidden"> 처럼 시각 요소가 없는 경우는 대체 컴포넌트가 없다
|
|
99
|
-
if (name ===
|
|
97
|
+
if (name === 'input' && EXEMPT_INPUT_TYPES.has(literalAttr(node, 'type'))) return;
|
|
100
98
|
|
|
101
|
-
context.report({ node: node.name, messageId:
|
|
99
|
+
context.report({ node: node.name, messageId: 'rawElement', data: { name, replacement } });
|
|
102
100
|
},
|
|
103
101
|
|
|
104
102
|
CallExpression(node) {
|
|
105
|
-
if (node.callee.type !==
|
|
103
|
+
if (node.callee.type !== 'Identifier') return;
|
|
106
104
|
const name = node.callee.name;
|
|
107
105
|
const replacement = GLOBAL_CALLS[name];
|
|
108
106
|
if (!replacement) return;
|
|
109
107
|
// 지역 선언(사용자가 만든 confirm 등)은 제외
|
|
110
|
-
if (
|
|
108
|
+
if (
|
|
109
|
+
context.sourceCode
|
|
110
|
+
.getScope(node)
|
|
111
|
+
.references.some(r => r.identifier === node.callee && r.resolved)
|
|
112
|
+
) {
|
|
111
113
|
return;
|
|
112
114
|
}
|
|
113
|
-
context.report({ node, messageId:
|
|
115
|
+
context.report({ node, messageId: 'rawCall', data: { name, replacement } });
|
|
114
116
|
},
|
|
115
117
|
};
|
|
116
118
|
},
|
|
@@ -4,12 +4,19 @@
|
|
|
4
4
|
*
|
|
5
5
|
* AGENTS.md §1-3 / §2-1.
|
|
6
6
|
*/
|
|
7
|
-
import { collectClassTokens, stripVariants, stripModifiers } from
|
|
8
|
-
import { TEXT_SIZES, TYPO_PRESETS } from
|
|
7
|
+
import { collectClassTokens, stripVariants, stripModifiers } from '../lib/class-names.mjs';
|
|
8
|
+
import { TEXT_SIZES, TYPO_PRESETS } from '../scale.gen.mjs';
|
|
9
9
|
|
|
10
10
|
const FONT_WEIGHTS = new Set([
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
'font-thin',
|
|
12
|
+
'font-extralight',
|
|
13
|
+
'font-light',
|
|
14
|
+
'font-normal',
|
|
15
|
+
'font-medium',
|
|
16
|
+
'font-semibold',
|
|
17
|
+
'font-bold',
|
|
18
|
+
'font-extrabold',
|
|
19
|
+
'font-black',
|
|
13
20
|
]);
|
|
14
21
|
|
|
15
22
|
const TEXT_SIZE_SET = new Set(TEXT_SIZES.map(String));
|
|
@@ -17,27 +24,26 @@ const TEXT_SIZE_SET = new Set(TEXT_SIZES.map(String));
|
|
|
17
24
|
/** 자주 쓰는 조합에 대한 추천 프리셋 (없으면 일반 안내) */
|
|
18
25
|
function suggest(size) {
|
|
19
26
|
const byRole = {
|
|
20
|
-
12:
|
|
21
|
-
14:
|
|
22
|
-
16:
|
|
23
|
-
18:
|
|
24
|
-
11:
|
|
27
|
+
12: 'typo-body-sm-*',
|
|
28
|
+
14: 'typo-body-md-* / typo-heading-sm',
|
|
29
|
+
16: 'typo-body-lg-* / typo-heading-md',
|
|
30
|
+
18: 'typo-heading-lg',
|
|
31
|
+
11: 'typo-body-xs-*',
|
|
25
32
|
};
|
|
26
|
-
return byRole[size] ??
|
|
33
|
+
return byRole[size] ?? 'typo-*';
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
export default {
|
|
30
37
|
meta: {
|
|
31
|
-
type:
|
|
38
|
+
type: 'suggestion',
|
|
32
39
|
docs: {
|
|
33
|
-
description:
|
|
40
|
+
description: '폰트 크기·굵기 낱개 조합 대신 typo-* 프리셋 사용',
|
|
34
41
|
},
|
|
35
42
|
schema: [],
|
|
36
43
|
messages: {
|
|
37
|
-
fontSize:
|
|
38
|
-
"`{{token}}` 대신 타이포그래피 프리셋을 쓰세요 — {{suggestion}}. (AGENTS.md §2-1)",
|
|
44
|
+
fontSize: '`{{token}}` 대신 타이포그래피 프리셋을 쓰세요 — {{suggestion}}. (AGENTS.md §2-1)',
|
|
39
45
|
fontWeight:
|
|
40
|
-
|
|
46
|
+
'`{{token}}` 을 단독으로 쓰지 말고 굵기가 포함된 typo-* 프리셋을 쓰세요. (AGENTS.md §2-1)',
|
|
41
47
|
},
|
|
42
48
|
},
|
|
43
49
|
|
|
@@ -57,14 +63,14 @@ export default {
|
|
|
57
63
|
if (sizeMatch && TEXT_SIZE_SET.has(sizeMatch[1])) {
|
|
58
64
|
context.report({
|
|
59
65
|
node: valueNode,
|
|
60
|
-
messageId:
|
|
66
|
+
messageId: 'fontSize',
|
|
61
67
|
data: { token, suggestion: suggest(Number(sizeMatch[1])) },
|
|
62
68
|
});
|
|
63
69
|
continue;
|
|
64
70
|
}
|
|
65
71
|
|
|
66
72
|
if (!hasPreset && FONT_WEIGHTS.has(util)) {
|
|
67
|
-
context.report({ node: valueNode, messageId:
|
|
73
|
+
context.report({ node: valueNode, messageId: 'fontWeight', data: { token } });
|
|
68
74
|
}
|
|
69
75
|
}
|
|
70
76
|
},
|
|
@@ -7,34 +7,29 @@
|
|
|
7
7
|
*
|
|
8
8
|
* AGENTS.md §1-4 / §3-4.
|
|
9
9
|
*/
|
|
10
|
-
import {
|
|
11
|
-
NUMERIC_LABEL,
|
|
12
|
-
isNonQuantityLabel,
|
|
13
|
-
prop,
|
|
14
|
-
asColumn,
|
|
15
|
-
} from "../lib/table-column.mjs";
|
|
10
|
+
import { NUMERIC_LABEL, isNonQuantityLabel, prop, asColumn } from '../lib/table-column.mjs';
|
|
16
11
|
|
|
17
12
|
export default {
|
|
18
13
|
meta: {
|
|
19
|
-
type:
|
|
14
|
+
type: 'problem',
|
|
20
15
|
docs: {
|
|
21
|
-
description:
|
|
16
|
+
description: '금액·수량 등 숫자 표시에 toLocaleString 사용',
|
|
22
17
|
},
|
|
23
18
|
schema: [
|
|
24
19
|
{
|
|
25
|
-
type:
|
|
20
|
+
type: 'object',
|
|
26
21
|
properties: {
|
|
27
22
|
/** 검사에서 뺄 컬럼 name */
|
|
28
|
-
allow: { type:
|
|
23
|
+
allow: { type: 'array', items: { type: 'string' }, uniqueItems: true },
|
|
29
24
|
},
|
|
30
25
|
additionalProperties: false,
|
|
31
26
|
},
|
|
32
27
|
],
|
|
33
28
|
messages: {
|
|
34
29
|
missingFormat:
|
|
35
|
-
|
|
30
|
+
'숫자 컬럼 `{{label}}` 에 format 이 없습니다. `format: (v) => `${Number(v).toLocaleString()}{{unit}}`` 처럼 세 자리 구분을 넣으세요. (AGENTS.md §1-4)',
|
|
36
31
|
missingLocale:
|
|
37
|
-
|
|
32
|
+
'숫자 컬럼 `{{label}}` 의 format 이 toLocaleString 을 쓰지 않습니다. 세 자리 구분 없이 표시됩니다. (AGENTS.md §1-4)',
|
|
38
33
|
},
|
|
39
34
|
},
|
|
40
35
|
|
|
@@ -54,25 +49,25 @@ export default {
|
|
|
54
49
|
|
|
55
50
|
// render / renderCell 로 셀을 직접 그리는 경우는 이 규칙이 판단하지 않는다
|
|
56
51
|
// (renderCell 은 3.x STable 의 `<td>` 커스텀 렌더 — 2.2.0 에서 추가됐다)
|
|
57
|
-
if (prop(node,
|
|
52
|
+
if (prop(node, 'render') || prop(node, 'renderCell')) return;
|
|
58
53
|
|
|
59
54
|
const unit = /금액|가격|단가|판매가|원가|비용|수수료|배송비|할인|합계|총액|잔액/.test(label)
|
|
60
|
-
?
|
|
61
|
-
:
|
|
55
|
+
? '원'
|
|
56
|
+
: '';
|
|
62
57
|
|
|
63
|
-
const formatProp = prop(node,
|
|
58
|
+
const formatProp = prop(node, 'format');
|
|
64
59
|
if (!formatProp) {
|
|
65
60
|
context.report({
|
|
66
61
|
node: labelProp,
|
|
67
|
-
messageId:
|
|
62
|
+
messageId: 'missingFormat',
|
|
68
63
|
data: { label, unit },
|
|
69
64
|
});
|
|
70
65
|
return;
|
|
71
66
|
}
|
|
72
67
|
|
|
73
68
|
const src = context.sourceCode.getText(formatProp);
|
|
74
|
-
if (!src.includes(
|
|
75
|
-
context.report({ node: formatProp, messageId:
|
|
69
|
+
if (!src.includes('toLocaleString')) {
|
|
70
|
+
context.report({ node: formatProp, messageId: 'missingLocale', data: { label } });
|
|
76
71
|
}
|
|
77
72
|
},
|
|
78
73
|
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `STableColumn` 의 폭 선언을 검사한다.
|
|
3
|
+
*
|
|
4
|
+
* 테이블은 `table-fixed` 라 컬럼 폭이 `<colgroup>` 의 `<col width>` 로 들어간다.
|
|
5
|
+
* 그래서 폭에 넣을 수 있는 값은 px 뿐이고, 그 밖의 값은 **화면에서 조용히 어긋난다** —
|
|
6
|
+
* `'30%'` 는 `parseInt` 에 30(px)으로 읽히고, `clamp()` 같은 함수형 값은 NaN 이 되어
|
|
7
|
+
* `<col>` 폭이 통째로 무효가 된 뒤 auto 로 떨어진다. 둘 다 에러 없이 화면만 틀어진다.
|
|
8
|
+
*
|
|
9
|
+
* 그리고 폭을 아예 주지 않으면 기본 120px 이 조용히 들어간다. "짧은 열이라 그대로 둔 것"과
|
|
10
|
+
* "판단을 빠뜨린 것"이 구분되지 않으므로, 120px 이 맞더라도 `width: 120` 을 적는 편이 낫다.
|
|
11
|
+
*
|
|
12
|
+
* `autoWidth` 는 남은 폭을 흡수하는 스페이서 열 하나에 쓰는 것이라, 값을 그리는 열
|
|
13
|
+
* (`render` · `format` 이 붙은 열)에 주면 폭이 다른 열에 좌우돼 화면마다 달라진다.
|
|
14
|
+
*
|
|
15
|
+
* 대상은 `name`(문자열 리터럴) · `label` 에 더해 `field` 또는 `autoWidth` 를 가진 객체 리터럴이다.
|
|
16
|
+
* `STableColumn` 타입이 값을 그리는 열에는 `field` 를, 스페이서 열에는 `autoWidth` 를 요구하므로
|
|
17
|
+
* 검사 범위는 그대로이면서, 같은 모양(`name` + `label`)인 검색 필터 필드가 걸리지 않는다.
|
|
18
|
+
*
|
|
19
|
+
* AGENTS.md §3-4.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import { prop, asColumnShape } from '../lib/table-column.mjs';
|
|
23
|
+
|
|
24
|
+
/** px 로 읽히는 폭 값인가 — 숫자 리터럴 또는 `'120px'` */
|
|
25
|
+
function pxWidth(valueNode) {
|
|
26
|
+
if (!valueNode) return undefined;
|
|
27
|
+
if (valueNode.type === 'Literal' && typeof valueNode.value === 'number') return valueNode.value;
|
|
28
|
+
if (valueNode.type === 'Literal' && typeof valueNode.value === 'string') {
|
|
29
|
+
const m = /^\s*(\d+)px\s*$/.exec(valueNode.value);
|
|
30
|
+
return m ? Number(m[1]) : undefined;
|
|
31
|
+
}
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default {
|
|
36
|
+
meta: {
|
|
37
|
+
type: 'problem',
|
|
38
|
+
docs: {
|
|
39
|
+
description: '테이블 컬럼 폭은 px 로만 주고, autoWidth 는 스페이서 열에만 쓴다',
|
|
40
|
+
},
|
|
41
|
+
schema: [
|
|
42
|
+
{
|
|
43
|
+
type: 'object',
|
|
44
|
+
properties: {
|
|
45
|
+
/** 검사에서 뺄 컬럼 name */
|
|
46
|
+
allow: { type: 'array', items: { type: 'string' }, uniqueItems: true },
|
|
47
|
+
},
|
|
48
|
+
additionalProperties: false,
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
messages: {
|
|
52
|
+
noWidth:
|
|
53
|
+
'컬럼 `{{name}}` 에 `width` 도 `autoWidth` 도 없어 기본 120px 이 조용히 들어갑니다. 120px 이 맞더라도 `width: 120` 으로 적어 판단한 값임을 남기세요. (AGENTS.md §3-4)',
|
|
54
|
+
badWidth:
|
|
55
|
+
"컬럼 `{{name}}` 의 `width: {{width}}` 는 px 이 아닙니다. 컬럼 폭은 `<col width>` 로 들어가 % · clamp() · min() 은 계산되지 않고 조용히 깨집니다 — `width: 120` 또는 `'120px'` 로 주세요. (AGENTS.md §3-4)",
|
|
56
|
+
autoWidthWithContent:
|
|
57
|
+
'컬럼 `{{name}}` 은 `{{contentProp}}` 로 값을 그리는데 `autoWidth` 입니다. `autoWidth` 는 남은 폭을 흡수하는 스페이서 열 하나에만 씁니다 — 값이 들어가는 열은 폭이 다른 열에 좌우돼 화면마다 달라집니다. px 로 폭을 명시하세요. (AGENTS.md §3-4)',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
create(context) {
|
|
62
|
+
const allow = new Set(context.options[0]?.allow ?? []);
|
|
63
|
+
|
|
64
|
+
return {
|
|
65
|
+
ObjectExpression(node) {
|
|
66
|
+
const column = asColumnShape(node);
|
|
67
|
+
if (!column) return;
|
|
68
|
+
const { columnName } = column;
|
|
69
|
+
if (allow.has(columnName)) return;
|
|
70
|
+
|
|
71
|
+
const widthProp = prop(node, 'width');
|
|
72
|
+
const autoWidthProp = prop(node, 'autoWidth');
|
|
73
|
+
// autoWidth 를 변수로 넘기면 켜졌는지 알 수 없다 — 판단하지 않는다
|
|
74
|
+
const autoWidthValue = autoWidthProp?.value;
|
|
75
|
+
if (autoWidthProp && autoWidthValue?.type !== 'Literal') return;
|
|
76
|
+
const autoWidth = autoWidthValue?.value === true;
|
|
77
|
+
|
|
78
|
+
if (autoWidth) {
|
|
79
|
+
const contentProp = prop(node, 'render') ?? prop(node, 'format');
|
|
80
|
+
if (contentProp) {
|
|
81
|
+
context.report({
|
|
82
|
+
node: autoWidthProp,
|
|
83
|
+
messageId: 'autoWidthWithContent',
|
|
84
|
+
data: {
|
|
85
|
+
name: columnName,
|
|
86
|
+
contentProp: contentProp.key.name ?? contentProp.key.value,
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (!widthProp) {
|
|
94
|
+
context.report({
|
|
95
|
+
node: column.nameProp,
|
|
96
|
+
messageId: 'noWidth',
|
|
97
|
+
data: { name: columnName },
|
|
98
|
+
});
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// 변수·계산식으로 넘긴 폭은 정적으로 알 수 없다
|
|
103
|
+
if (widthProp.value.type !== 'Literal') return;
|
|
104
|
+
if (pxWidth(widthProp.value) === undefined) {
|
|
105
|
+
context.report({
|
|
106
|
+
node: widthProp,
|
|
107
|
+
messageId: 'badWidth',
|
|
108
|
+
data: { name: columnName, width: context.sourceCode.getText(widthProp.value) },
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
},
|
|
114
|
+
};
|