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
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 필드 폭을 `maxLength`(= 스키마 상한) 기준으로 고정했는지 검사한다.
|
|
3
|
+
*
|
|
4
|
+
* 확정 규칙 (design-feedback-final.md §1-2):
|
|
5
|
+
* 필드 너비는 maxLength 로 정한다.
|
|
6
|
+
* - 상한이 등급 안에 들어오면 → 그 등급
|
|
7
|
+
* - 상한이 등급 상한(xl)을 넘거나 상한이 없으면 → 행 전체 + 100%
|
|
8
|
+
* - 셀렉트는 예외 (maxLength 개념이 없어 목록 최장값 기준) → 대상 아님
|
|
9
|
+
*
|
|
10
|
+
* 디자인팀이 요구한 "검수: maxLength ↔ 폭 등급 적합성 필수 확인" 을 자동화한 것이다.
|
|
11
|
+
* 사람이 하는 검수는 스키마가 나중에 확정되는 화면에서 빠지기 쉽다 —
|
|
12
|
+
* 시안 단계의 잠정 등급이 그대로 남아도 화면은 멀쩡해 보이기 때문이다.
|
|
13
|
+
*
|
|
14
|
+
* 대상이 아닌 것과 그 이유:
|
|
15
|
+
* STextarea 여러 줄로 접히므로 maxLength 가 폭을 정하지 않는다
|
|
16
|
+
* SSelect 계열 maxLength 개념이 없다 (§1-2 예외 — 목록 최장값 기준)
|
|
17
|
+
* SDatePicker 계열 컴포넌트가 자체 상한을 갖는다 (B-14)
|
|
18
|
+
*
|
|
19
|
+
* ⚠️ 글자수 ↔ 등급 환산은 아직 디자인 확정본이 없어 토큰 값에서 계산한 잠정치다.
|
|
20
|
+
* 확정표가 오면 CHAR_RATIO 를 그 값으로 바꾼다. GRADES · CHAR_RATIO 모두 옵션으로 덮을 수 있다.
|
|
21
|
+
*/
|
|
22
|
+
import { FIELD_WIDTHS } from '../scale.gen.mjs';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 폭 등급 (px). `--cmp-field-width-*` 토큰에서 scale.gen.mjs 를 거쳐 들어온다 —
|
|
26
|
+
* 컴포넌트(`SFieldWidth`)와 이 규칙이 같은 소스를 본다. 여기에 숫자를 적지 않는다.
|
|
27
|
+
*/
|
|
28
|
+
export const GRADES = FIELD_WIDTHS;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 글자 하나가 차지하는 폭 (font-size 대비 비율).
|
|
32
|
+
* narrow — 영문·숫자. "이 등급에 안 담긴다" 를 판정할 때 쓴다(가장 좁게 잡아도 넘치면 확실히 위반)
|
|
33
|
+
* wide — 한글(전각). "한 등급 작아도 된다" 를 판정할 때 쓴다(가장 넓게 잡아도 남으면 확실히 과하다)
|
|
34
|
+
* 두 판정 사이에는 아무것도 보고하지 않는 구간이 남는다 — 오탐보다 미탐을 택한 것이다.
|
|
35
|
+
*/
|
|
36
|
+
export const CHAR_RATIO = { narrow: 0.55, wide: 1 };
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 컴포넌트별 기하. chrome 은 글자가 쓸 수 없는 폭(좌우 패딩 · 테두리 · 스테퍼)의 합이고
|
|
40
|
+
* 전부 theme.css 토큰 값에서 계산했다.
|
|
41
|
+
*
|
|
42
|
+
* SInput/SBarcodeInput paddingX(12·16) × 2 + border 1 × 2
|
|
43
|
+
* SNumberInput 스테퍼가 없으면 패딩이 두 배가 된다(SNumberInput.tsx:388) —
|
|
44
|
+
* 없을 때 paddingX(6·8) × 2 × 2 + border,
|
|
45
|
+
* 있을 때 paddingX × 2 + stepper(20·24) × 2 + gap(= paddingX) × 2 + border
|
|
46
|
+
*
|
|
47
|
+
* lengthProp — 숫자 필드의 스키마 상한은 `maxLength` 가 아니라 `max` 다.
|
|
48
|
+
* korean — 한글이 들어갈 수 있는가. false 면 두 판정 모두 narrow 로 계산한다.
|
|
49
|
+
* chromeStepper — `useButton` 일 때의 chrome. 기본값이 false 라 chrome 쪽이 기본이다.
|
|
50
|
+
*/
|
|
51
|
+
export const COMPONENTS = {
|
|
52
|
+
SInput: {
|
|
53
|
+
lengthProp: 'maxLength',
|
|
54
|
+
font: { sm: 12, md: 14 },
|
|
55
|
+
chrome: { sm: 26, md: 34 },
|
|
56
|
+
korean: true,
|
|
57
|
+
grades: ['sm', 'md', 'lg', 'xl'],
|
|
58
|
+
},
|
|
59
|
+
SBarcodeInput: {
|
|
60
|
+
lengthProp: 'maxLength',
|
|
61
|
+
font: { sm: 12, md: 14 },
|
|
62
|
+
chrome: { sm: 26, md: 34 },
|
|
63
|
+
korean: false, // 바코드는 영숫자다
|
|
64
|
+
grades: ['sm', 'md', 'lg', 'xl'],
|
|
65
|
+
},
|
|
66
|
+
SNumberInput: {
|
|
67
|
+
lengthProp: 'max',
|
|
68
|
+
font: { sm: 12, md: 14 },
|
|
69
|
+
chrome: { sm: 26, md: 34 },
|
|
70
|
+
chromeStepper: { sm: 66, md: 82 },
|
|
71
|
+
korean: false,
|
|
72
|
+
grades: ['xs', 'sm', 'md', 'lg', 'xl'], // xs 는 숫자 필드 전용 등급이다
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* 등급이 담을 수 있는 글자수. playground 의 실측 페이지가 같은 식을 쓰도록 내보낸다
|
|
78
|
+
* (숫자를 두 곳에 적으면 한쪽만 고쳐져 검수가 무의미해진다).
|
|
79
|
+
*/
|
|
80
|
+
export function capacity(spec, size, grade, ratio, grades = GRADES) {
|
|
81
|
+
const usable = Math.max(0, grades[grade] - spec.chrome[size]);
|
|
82
|
+
return Math.floor(usable / (spec.font[size] * ratio));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** 그 비율로 len 글자를 담을 수 있는 가장 작은 등급 (없으면 undefined) */
|
|
86
|
+
export function smallestGradeFor(spec, size, len, ratio, grades = GRADES) {
|
|
87
|
+
return spec.grades.find(g => capacity(spec, size, g, ratio, grades) >= len);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** JSX 속성 노드 */
|
|
91
|
+
function attr(node, name) {
|
|
92
|
+
return node.attributes.find(a => a.type === 'JSXAttribute' && a.name?.name === name);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* 속성에서 리터럴 값을 꺼낸다.
|
|
97
|
+
* 없음 → undefined
|
|
98
|
+
* 리터럴 → 값
|
|
99
|
+
* 그 밖(변수) → null (판단 불가 — 조용히 넘긴다)
|
|
100
|
+
*/
|
|
101
|
+
function literal(node, name) {
|
|
102
|
+
const a = attr(node, name);
|
|
103
|
+
if (!a) return undefined;
|
|
104
|
+
const v = a.value;
|
|
105
|
+
if (!v) return true; // <SNumberInput useButton /> 같은 boolean shorthand 는 true 다
|
|
106
|
+
if (v.type === 'Literal') return v.value;
|
|
107
|
+
if (v.type === 'JSXExpressionContainer' && v.expression.type === 'Literal') {
|
|
108
|
+
return v.expression.value;
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** `max={1000}` → 자릿수 4. 천단위 콤마도 폭을 먹으므로 함께 센다 */
|
|
114
|
+
function digitsOf(max) {
|
|
115
|
+
const digits = String(Math.abs(Math.trunc(max))).length;
|
|
116
|
+
return digits + Math.floor((digits - 1) / 3);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export default {
|
|
120
|
+
meta: {
|
|
121
|
+
type: 'problem',
|
|
122
|
+
docs: {
|
|
123
|
+
description: '필드 폭을 maxLength(스키마 상한) 기준 등급으로 고정',
|
|
124
|
+
},
|
|
125
|
+
// px → 등급 이름 치환만 자동으로 고친다. 등급 선택 자체는 스키마를 봐야 하므로 손대지 않는다.
|
|
126
|
+
fixable: 'code',
|
|
127
|
+
schema: [
|
|
128
|
+
{
|
|
129
|
+
type: 'object',
|
|
130
|
+
properties: {
|
|
131
|
+
/** 폭 등급 px 재정의 — 디자인 확정본이 오면 여기로 덮는다 */
|
|
132
|
+
grades: { type: 'object', additionalProperties: { type: 'number' } },
|
|
133
|
+
/** 글자폭 비율 재정의 */
|
|
134
|
+
charRatio: {
|
|
135
|
+
type: 'object',
|
|
136
|
+
properties: { narrow: { type: 'number' }, wide: { type: 'number' } },
|
|
137
|
+
additionalProperties: false,
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
additionalProperties: false,
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
messages: {
|
|
144
|
+
noGrade:
|
|
145
|
+
'`{{lengthProp}}={{len}}` 로 상한이 정해진 필드인데 `width` 가 없어 행 전체를 차지합니다. `width="{{suggest}}"`({{suggestPx}}px) 등급으로 고정하세요. (§1-2)',
|
|
146
|
+
offGrade:
|
|
147
|
+
'`width={{{width}}}` 는 폭 등급이 아닙니다. {{gradeList}} 중 하나이거나, 상한이 없으면 `width="100%"` 여야 합니다. (§1-2)',
|
|
148
|
+
pxGrade:
|
|
149
|
+
'`width={{{width}}}` 는 {{grade}} 등급의 px 값입니다. `width="{{grade}}"` 로 등급을 주세요 — px 를 박으면 `--cmp-field-width-*` 가 바뀌어도 이 화면만 그 자리에 남습니다. (§1-2)',
|
|
150
|
+
noBound:
|
|
151
|
+
'`width` 로 폭을 고정했는데 `{{lengthProp}}` 이 없습니다. 폭의 근거가 스키마 상한이므로, 상한이 없으면 행 전체(`width="100%"` 또는 생략)로 둡니다. (§1-2)',
|
|
152
|
+
tooNarrow:
|
|
153
|
+
'`{{lengthProp}}={{len}}` 이 {{grade}} 등급({{gradePx}}px)에 담기지 않습니다. `width="{{suggest}}"`({{suggestPx}}px) 이상이 필요합니다. (§1-2)',
|
|
154
|
+
tooWide:
|
|
155
|
+
'`{{lengthProp}}={{len}}` 은 {{suggest}} 등급({{suggestPx}}px)으로 충분한데 {{grade}} 등급({{gradePx}}px)을 주었습니다. 폭은 상한에 맞춥니다. (§1-2)',
|
|
156
|
+
overMax:
|
|
157
|
+
'`{{lengthProp}}={{len}}` 은 최대 등급 xl({{xl}}px)로도 담기지 않습니다. 행 전체(`width="100%"`)로 둡니다. (§1-2)',
|
|
158
|
+
fullWidthBounded:
|
|
159
|
+
'`{{lengthProp}}={{len}}` 로 상한이 정해져 있으므로 `width="100%"` 가 아니라 `width="{{suggest}}"`({{suggestPx}}px) 등급으로 고정합니다. 행 전체는 상한이 없거나 xl 을 넘을 때만 씁니다. (§1-2)',
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
|
|
163
|
+
create(context) {
|
|
164
|
+
const grades = { ...GRADES, ...(context.options[0]?.grades ?? {}) };
|
|
165
|
+
const ratio = { ...CHAR_RATIO, ...(context.options[0]?.charRatio ?? {}) };
|
|
166
|
+
|
|
167
|
+
return {
|
|
168
|
+
JSXOpeningElement(node) {
|
|
169
|
+
if (node.name.type !== 'JSXIdentifier') return;
|
|
170
|
+
const base = COMPONENTS[node.name.name];
|
|
171
|
+
if (!base) return;
|
|
172
|
+
|
|
173
|
+
// spread 가 있으면 width·maxLength 가 그 안에 있을 수 있어 판단하지 않는다
|
|
174
|
+
if (node.attributes.some(a => a.type === 'JSXSpreadAttribute')) return;
|
|
175
|
+
|
|
176
|
+
const size = literal(node, 'size') === 'md' ? 'md' : 'sm';
|
|
177
|
+
// 스테퍼가 붙으면 글자가 쓸 수 있는 폭이 크게 줄어든다 (useButton 기본값은 false)
|
|
178
|
+
const spec =
|
|
179
|
+
literal(node, 'useButton') === true && base.chromeStepper
|
|
180
|
+
? { ...base, chrome: base.chromeStepper }
|
|
181
|
+
: base;
|
|
182
|
+
|
|
183
|
+
const capacityAt = (grade, r) => capacity(spec, size, grade, r, grades);
|
|
184
|
+
const smallestFor = (len, r) => smallestGradeFor(spec, size, len, r, grades);
|
|
185
|
+
|
|
186
|
+
const narrow = ratio.narrow;
|
|
187
|
+
// 한글이 들어갈 수 없는 필드는 두 판정 모두 좁은 글자폭으로 계산한다
|
|
188
|
+
const wide = spec.korean ? ratio.wide : ratio.narrow;
|
|
189
|
+
|
|
190
|
+
const rawLen = literal(node, spec.lengthProp);
|
|
191
|
+
if (rawLen === null) return; // 변수로 넘긴 상한 — 판단 불가
|
|
192
|
+
const len =
|
|
193
|
+
rawLen === undefined ? undefined : spec.lengthProp === 'max' ? digitsOf(rawLen) : rawLen;
|
|
194
|
+
if (len !== undefined && (!Number.isFinite(len) || len <= 0)) return;
|
|
195
|
+
|
|
196
|
+
const rawWidth = literal(node, 'width');
|
|
197
|
+
if (rawWidth === null) return; // 변수로 넘긴 폭 — 판단 불가
|
|
198
|
+
|
|
199
|
+
const reportNode = attr(node, 'width') ?? attr(node, spec.lengthProp) ?? node.name;
|
|
200
|
+
const gradeList = spec.grades.map(g => `${g}(${grades[g]})`).join(' · ');
|
|
201
|
+
|
|
202
|
+
/* ── width 가 없다 ── */
|
|
203
|
+
if (rawWidth === undefined) {
|
|
204
|
+
if (len === undefined) return; // 둘 다 없음 = 상한 없는 필드 → 행 전체가 맞다
|
|
205
|
+
const suggest = smallestFor(len, wide);
|
|
206
|
+
if (!suggest) return; // xl 로도 안 담긴다 → 행 전체가 맞다
|
|
207
|
+
context.report({
|
|
208
|
+
node: reportNode,
|
|
209
|
+
messageId: 'noGrade',
|
|
210
|
+
data: { lengthProp: spec.lengthProp, len: rawLen, suggest, suggestPx: grades[suggest] },
|
|
211
|
+
});
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/* ── width="100%" ── */
|
|
216
|
+
if (rawWidth === '100%') {
|
|
217
|
+
if (len === undefined) return; // 상한 없음 + 행 전체 = 규칙대로다
|
|
218
|
+
const suggest = smallestFor(len, wide);
|
|
219
|
+
if (!suggest) return; // xl 초과 → 행 전체가 맞다
|
|
220
|
+
context.report({
|
|
221
|
+
node: reportNode,
|
|
222
|
+
messageId: 'fullWidthBounded',
|
|
223
|
+
data: { lengthProp: spec.lengthProp, len: rawLen, suggest, suggestPx: grades[suggest] },
|
|
224
|
+
});
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/* ── width 가 등급인가 ── */
|
|
229
|
+
// 등급 이름이 정답이다. px 는 등급 값과 일치할 때만 받아 주고(아래 pxGrade) 등급으로 바꾸게 한다.
|
|
230
|
+
const byName = spec.grades.includes(rawWidth);
|
|
231
|
+
const px =
|
|
232
|
+
typeof rawWidth === 'number' ? rawWidth : /^(\d+)px$/.exec(String(rawWidth))?.[1];
|
|
233
|
+
const grade = byName
|
|
234
|
+
? rawWidth
|
|
235
|
+
: px != null && spec.grades.find(g => grades[g] === Number(px));
|
|
236
|
+
if (!grade) {
|
|
237
|
+
context.report({
|
|
238
|
+
node: reportNode,
|
|
239
|
+
messageId: 'offGrade',
|
|
240
|
+
data: { width: String(rawWidth), gradeList },
|
|
241
|
+
});
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/* ── 등급은 맞다. 상한과 맞는가 ── */
|
|
246
|
+
if (len === undefined) {
|
|
247
|
+
context.report({
|
|
248
|
+
node: reportNode,
|
|
249
|
+
messageId: 'noBound',
|
|
250
|
+
data: { lengthProp: spec.lengthProp },
|
|
251
|
+
});
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// 영문·숫자로 채워도 넘치면 등급이 확실히 좁다
|
|
256
|
+
if (capacityAt(grade, narrow) < len) {
|
|
257
|
+
const suggest = smallestFor(len, narrow);
|
|
258
|
+
if (!suggest) {
|
|
259
|
+
context.report({
|
|
260
|
+
node: reportNode,
|
|
261
|
+
messageId: 'overMax',
|
|
262
|
+
data: { lengthProp: spec.lengthProp, len: rawLen, xl: grades.xl },
|
|
263
|
+
});
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
context.report({
|
|
267
|
+
node: reportNode,
|
|
268
|
+
messageId: 'tooNarrow',
|
|
269
|
+
data: {
|
|
270
|
+
lengthProp: spec.lengthProp,
|
|
271
|
+
len: rawLen,
|
|
272
|
+
grade,
|
|
273
|
+
gradePx: grades[grade],
|
|
274
|
+
suggest,
|
|
275
|
+
suggestPx: grades[suggest],
|
|
276
|
+
},
|
|
277
|
+
});
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// 한글로 채워도 더 작은 등급에 들어가면 등급이 확실히 과하다
|
|
282
|
+
const enough = smallestFor(len, wide);
|
|
283
|
+
if (enough && grades[enough] < grades[grade]) {
|
|
284
|
+
context.report({
|
|
285
|
+
node: reportNode,
|
|
286
|
+
messageId: 'tooWide',
|
|
287
|
+
data: {
|
|
288
|
+
lengthProp: spec.lengthProp,
|
|
289
|
+
len: rawLen,
|
|
290
|
+
grade,
|
|
291
|
+
gradePx: grades[grade],
|
|
292
|
+
suggest: enough,
|
|
293
|
+
suggestPx: grades[enough],
|
|
294
|
+
},
|
|
295
|
+
});
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// 등급도 상한도 맞다. 남은 것은 표기 — px 는 토큰을 따라가지 않으므로 등급 이름으로 바꾼다.
|
|
300
|
+
if (!byName) {
|
|
301
|
+
context.report({
|
|
302
|
+
node: reportNode,
|
|
303
|
+
messageId: 'pxGrade',
|
|
304
|
+
data: { width: String(rawWidth), grade },
|
|
305
|
+
fix: fixer => fixer.replaceText(reportNode, `width="${grade}"`),
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
};
|
|
310
|
+
},
|
|
311
|
+
};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* AGENTS.md §1-2.
|
|
9
9
|
*/
|
|
10
|
-
import { collectClassTokens, stripVariants, stripModifiers } from
|
|
10
|
+
import { collectClassTokens, stripVariants, stripModifiers } from '../lib/class-names.mjs';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* 토큰이 존재하는 속성 접두어 — 여기에 임의 값을 쓰면 디자인 시스템을 우회하는 것이다.
|
|
@@ -15,59 +15,102 @@ import { collectClassTokens, stripVariants, stripModifiers } from "../lib/class-
|
|
|
15
15
|
*/
|
|
16
16
|
const TOKEN_BACKED = [
|
|
17
17
|
// 색 (text- 는 색·폰트크기 양쪽 모두 토큰이 있어 어느 쪽이든 대상)
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
'text',
|
|
19
|
+
'bg',
|
|
20
|
+
'border',
|
|
21
|
+
'outline',
|
|
22
|
+
'ring',
|
|
23
|
+
'shadow',
|
|
24
|
+
'fill',
|
|
25
|
+
'stroke',
|
|
26
|
+
'divide',
|
|
27
|
+
'accent',
|
|
28
|
+
'caret',
|
|
29
|
+
'decoration',
|
|
30
|
+
'from',
|
|
31
|
+
'via',
|
|
32
|
+
'to',
|
|
20
33
|
// 타이포
|
|
21
|
-
|
|
34
|
+
'font',
|
|
35
|
+
'leading',
|
|
36
|
+
'tracking',
|
|
22
37
|
// 간격
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
38
|
+
'gap',
|
|
39
|
+
'gap-x',
|
|
40
|
+
'gap-y',
|
|
41
|
+
'space-x',
|
|
42
|
+
'space-y',
|
|
43
|
+
'p',
|
|
44
|
+
'px',
|
|
45
|
+
'py',
|
|
46
|
+
'pt',
|
|
47
|
+
'pr',
|
|
48
|
+
'pb',
|
|
49
|
+
'pl',
|
|
50
|
+
'ps',
|
|
51
|
+
'pe',
|
|
52
|
+
'm',
|
|
53
|
+
'mx',
|
|
54
|
+
'my',
|
|
55
|
+
'mt',
|
|
56
|
+
'mr',
|
|
57
|
+
'mb',
|
|
58
|
+
'ml',
|
|
59
|
+
'ms',
|
|
60
|
+
'me',
|
|
26
61
|
// 모서리
|
|
27
|
-
|
|
28
|
-
|
|
62
|
+
'rounded',
|
|
63
|
+
'rounded-t',
|
|
64
|
+
'rounded-r',
|
|
65
|
+
'rounded-b',
|
|
66
|
+
'rounded-l',
|
|
67
|
+
'rounded-tl',
|
|
68
|
+
'rounded-tr',
|
|
69
|
+
'rounded-br',
|
|
70
|
+
'rounded-bl',
|
|
29
71
|
];
|
|
30
72
|
|
|
31
73
|
/** 대괄호 안이 토큰 참조인지 — `var(--x)` 또는 `length:var(--x)` 같은 데이터타입 접두어 허용 */
|
|
32
74
|
function isTokenReference(inner) {
|
|
33
|
-
const body = inner.includes(
|
|
75
|
+
const body = inner.includes(':') ? inner.slice(inner.indexOf(':') + 1) : inner;
|
|
34
76
|
return /^var\(--[\w-]+\)$/.test(body.trim());
|
|
35
77
|
}
|
|
36
78
|
|
|
37
79
|
/** `bg-[#eee]` → `bg` 처럼 임의 값 앞의 유틸리티 접두어를 뽑는다 */
|
|
38
80
|
function prefixOf(util) {
|
|
39
|
-
const idx = util.indexOf(
|
|
40
|
-
return idx <= 0 ?
|
|
81
|
+
const idx = util.indexOf('[');
|
|
82
|
+
return idx <= 0 ? '' : util.slice(0, idx - 1); // 대괄호 바로 앞의 `-` 제외
|
|
41
83
|
}
|
|
42
84
|
|
|
43
85
|
export default {
|
|
44
86
|
meta: {
|
|
45
|
-
type:
|
|
87
|
+
type: 'problem',
|
|
46
88
|
docs: {
|
|
47
|
-
description:
|
|
89
|
+
description:
|
|
90
|
+
'색·타이포·간격·모서리에 임의 값 금지 — 토큰 유틸리티 또는 var(--token) 참조 사용',
|
|
48
91
|
},
|
|
49
92
|
schema: [
|
|
50
93
|
{
|
|
51
|
-
type:
|
|
94
|
+
type: 'object',
|
|
52
95
|
properties: {
|
|
53
96
|
/** 예외로 허용할 클래스 (완전 일치) */
|
|
54
|
-
allow: { type:
|
|
97
|
+
allow: { type: 'array', items: { type: 'string' }, uniqueItems: true },
|
|
55
98
|
/** 검사 대상에서 뺄 유틸리티 접두어 (예: ["shadow"]) */
|
|
56
|
-
ignorePrefixes: { type:
|
|
99
|
+
ignorePrefixes: { type: 'array', items: { type: 'string' }, uniqueItems: true },
|
|
57
100
|
},
|
|
58
101
|
additionalProperties: false,
|
|
59
102
|
},
|
|
60
103
|
],
|
|
61
104
|
messages: {
|
|
62
105
|
arbitrary:
|
|
63
|
-
|
|
106
|
+
'`{{token}}` — {{prefix}} 는 디자인 토큰이 있는 속성이라 임의 값을 쓸 수 없습니다. 토큰 유틸리티를 쓰거나 var(--token) 으로 참조하세요. (AGENTS.md §1-2)',
|
|
64
107
|
},
|
|
65
108
|
},
|
|
66
109
|
|
|
67
110
|
create(context) {
|
|
68
111
|
const allow = new Set(context.options[0]?.allow ?? []);
|
|
69
112
|
const ignored = new Set(context.options[0]?.ignorePrefixes ?? []);
|
|
70
|
-
const targets = TOKEN_BACKED.filter(
|
|
113
|
+
const targets = TOKEN_BACKED.filter(p => !ignored.has(p));
|
|
71
114
|
|
|
72
115
|
return {
|
|
73
116
|
JSXAttribute(node) {
|
|
@@ -83,7 +126,7 @@ export default {
|
|
|
83
126
|
const prefix = prefixOf(util);
|
|
84
127
|
if (!targets.includes(prefix)) continue;
|
|
85
128
|
|
|
86
|
-
context.report({ node: valueNode, messageId:
|
|
129
|
+
context.report({ node: valueNode, messageId: 'arbitrary', data: { token, prefix } });
|
|
87
130
|
}
|
|
88
131
|
},
|
|
89
132
|
};
|