sellmate-design-system-react 9.0.0-beta.8 → 9.0.0-beta.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +3974 -267
- package/README.md +76 -24
- package/bin/sellmate-ds.mjs +91 -59
- package/dist/components/SAccountListBox/AccountListBoxPortal.d.ts +31 -0
- package/dist/components/SAccountListBox/README.md +86 -0
- package/dist/components/SAccountListBox/SAccountListBox.d.ts +79 -0
- package/dist/components/SAccountListBox/SystemMenuPortal.d.ts +58 -0
- package/dist/components/SAccountListBox/accountListBox.config.d.ts +64 -0
- package/dist/components/SAccountListBox/index.d.ts +2 -0
- package/dist/components/SActionModal/README.md +1 -0
- package/dist/components/SActionModal/SActionModal.d.ts +9 -1
- package/dist/components/SBadge/README.md +27 -0
- package/dist/components/SBadge/SBadge.d.ts +1 -1
- package/dist/components/SBarChart/README.md +122 -0
- package/dist/components/SBarChart/SBarChart.d.ts +99 -0
- package/dist/components/SBarChart/barChart.config.d.ts +85 -0
- package/dist/components/SBarChart/index.d.ts +2 -0
- package/dist/components/SBarcodeInput/README.md +14 -4
- package/dist/components/SBarcodeInput/SBarcodeInput.d.ts +25 -3
- package/dist/components/SButton/README.md +40 -0
- package/dist/components/SCalendar/README.md +13 -0
- package/dist/components/SCalendarBoard/CalendarDayCard.d.ts +53 -0
- package/dist/components/SCalendarBoard/CalendarDayEventListBox.d.ts +26 -0
- package/dist/components/SCalendarBoard/CalendarEventButton.d.ts +20 -0
- package/dist/components/SCalendarBoard/CalendarMoreButton.d.ts +18 -0
- package/dist/components/SCalendarBoard/README.md +148 -0
- package/dist/components/SCalendarBoard/SCalendarBoard.d.ts +83 -0
- package/dist/components/SCalendarBoard/calendar-board-layout.d.ts +59 -0
- package/dist/components/SCalendarBoard/calendarBoard.config.d.ts +38 -0
- package/dist/components/SCalendarBoard/index.d.ts +3 -0
- package/dist/components/SCalendarBoard/types.d.ts +40 -0
- package/dist/components/SCallout/README.md +17 -1
- package/dist/components/SCallout/SCallout.d.ts +14 -4
- package/dist/components/SCard/README.md +17 -0
- package/dist/components/SCard/SCard.d.ts +26 -2
- package/dist/components/SChatAttachedFile/README.md +33 -0
- package/dist/components/SChatAttachedFile/SChatAttachedFile.d.ts +13 -0
- package/dist/components/SChatAttachedFile/chatAttachedFile.config.d.ts +23 -0
- package/dist/components/SChatAttachedFile/index.d.ts +2 -0
- package/dist/components/SChatFile/README.md +33 -0
- package/dist/components/SChatFile/SChatFile.d.ts +37 -0
- package/dist/components/SChatFile/chatFile.config.d.ts +56 -0
- package/dist/components/SChatFile/index.d.ts +2 -0
- package/dist/components/SChatInput/README.md +44 -0
- package/dist/components/SChatInput/SChatInput.d.ts +60 -0
- package/dist/components/SChatInput/index.d.ts +1 -0
- package/dist/components/SChatMessage/README.md +86 -0
- package/dist/components/SChatMessage/SChatMessage.d.ts +123 -0
- package/dist/components/SChatMessage/index.d.ts +1 -0
- package/dist/components/SChatSystemMessage/README.md +12 -0
- package/dist/components/SChatSystemMessage/SChatSystemMessage.d.ts +18 -0
- package/dist/components/SChatSystemMessage/index.d.ts +1 -0
- package/dist/components/SCheckbox/README.md +8 -0
- package/dist/components/SChip/README.md +25 -0
- package/dist/components/SChip/SChip.d.ts +8 -0
- package/dist/components/SChip/index.d.ts +1 -1
- package/dist/components/SChipFilter/README.md +369 -14
- package/dist/components/SChipFilter/SChipFilter.d.ts +169 -60
- package/dist/components/SChipFilter/index.d.ts +1 -1
- package/dist/components/SChipInput/README.md +18 -2
- package/dist/components/SChipInput/SChipInput.d.ts +23 -3
- package/dist/components/SChipInput/index.d.ts +1 -1
- package/dist/components/SCircleProgress/README.md +13 -2
- package/dist/components/SCircleProgress/SCircleProgress.d.ts +11 -3
- package/dist/components/SConfirmModal/README.md +13 -4
- package/dist/components/SConfirmModal/SConfirmModal.d.ts +46 -9
- package/dist/components/SContextAlert/README.md +52 -0
- package/dist/components/SContextAlert/SContextAlert.d.ts +51 -0
- package/dist/components/SContextAlert/contextAlert.config.d.ts +22 -0
- package/dist/components/SContextAlert/index.d.ts +2 -0
- package/dist/components/SDatePicker/README.md +22 -2
- package/dist/components/SDatePicker/SDatePicker.d.ts +42 -5
- package/dist/components/SDateRangePicker/README.md +22 -4
- package/dist/components/SDateRangePicker/SDateRangePicker.d.ts +44 -7
- package/dist/components/SDivider/README.md +7 -0
- package/dist/components/SDivider/SDivider.d.ts +11 -0
- package/dist/components/SDonutChart/README.md +105 -0
- package/dist/components/SDonutChart/SDonutChart.d.ts +82 -0
- package/dist/components/SDonutChart/index.d.ts +1 -0
- package/dist/components/SDraggableItem/README.md +37 -0
- package/dist/components/SDraggableItem/SDraggableItem.d.ts +2 -0
- package/dist/components/SDraggableItem/index.d.ts +1 -1
- package/dist/components/SDraggableList/README.md +33 -3
- package/dist/components/SDraggableList/SDraggableList.d.ts +18 -3
- package/dist/components/SDraggableList/index.d.ts +1 -1
- package/dist/components/SDrawer/README.md +8 -0
- package/dist/components/SDropdownButton/README.md +19 -0
- package/dist/components/SEditor/EditorBody.d.ts +36 -0
- package/dist/components/SEditor/EditorToolbar.d.ts +93 -0
- package/dist/components/SEditor/README.md +205 -0
- package/dist/components/SEditor/SEditor.d.ts +128 -0
- package/dist/components/SEditor/editor-icons.d.ts +63 -0
- package/dist/components/SEditor/editor.config.d.ts +119 -0
- package/dist/components/SEditor/index.d.ts +8 -0
- package/dist/components/SEditor/tiptap-api.d.ts +29 -0
- package/dist/components/SEditor/use-is-mobile.d.ts +14 -0
- package/dist/components/SExpansionItem/README.md +38 -2
- package/dist/components/SExpansionItem/SExpansionItem.d.ts +8 -2
- package/dist/components/SExpansionItem/index.d.ts +1 -1
- package/dist/components/SField/README.md +37 -5
- package/dist/components/SField/SField.d.ts +40 -8
- package/dist/components/SField/index.d.ts +1 -1
- package/dist/components/SFilePicker/README.md +20 -4
- package/dist/components/SFilePicker/SFilePicker.d.ts +26 -6
- package/dist/components/SFooter/README.md +44 -0
- package/dist/components/SFooter/SFooter.d.ts +29 -13
- package/dist/components/SFooter/index.d.ts +1 -1
- package/dist/components/SForm/README.md +12 -1
- package/dist/components/SForm/SForm.d.ts +2 -2
- package/dist/components/SGhostButton/README.md +28 -4
- package/dist/components/SGhostButton/SGhostButton.d.ts +4 -1
- package/dist/components/SGnb/README.md +109 -8
- package/dist/components/SGnb/SGnb.d.ts +112 -11
- package/dist/components/SGnb/gnb.config.d.ts +18 -5
- package/dist/components/SGnb/index.d.ts +1 -1
- package/dist/components/SGnbSystem/README.md +186 -0
- package/dist/components/SGnbSystem/SGnbSystem.d.ts +179 -0
- package/dist/components/SGnbSystem/gnbSystem.config.d.ts +122 -0
- package/dist/components/SGnbSystem/index.d.ts +2 -0
- package/dist/components/SGuide/README.md +16 -1
- package/dist/components/SGuide/SGuide.d.ts +5 -2
- package/dist/components/SIcon/README.md +20 -0
- package/dist/components/SIcon/SIcon.d.ts +1 -1
- package/dist/components/SIcon/icons.gen.d.ts +20 -1
- package/dist/components/SImage/README.md +23 -1
- package/dist/components/SImage/SImage.d.ts +11 -8
- package/dist/components/SInput/README.md +8 -4
- package/dist/components/SInput/SInput.d.ts +17 -5
- package/dist/components/SKeyValueTable/README.md +88 -0
- package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +30 -3
- package/dist/components/SKeyValueTable/index.d.ts +1 -1
- package/dist/components/SLauncherListBox/README.md +82 -0
- package/dist/components/SLauncherListBox/SLauncherListBox.d.ts +80 -0
- package/dist/components/SLauncherListBox/index.d.ts +2 -0
- package/dist/components/SLauncherListBox/launcherListBox.config.d.ts +154 -0
- package/dist/components/SLayout/README.md +22 -1
- package/dist/components/SLayout/SLayout.d.ts +6 -2
- package/dist/components/SLayout/index.d.ts +1 -1
- package/dist/components/SLineChart/README.md +131 -0
- package/dist/components/SLineChart/SLineChart.d.ts +110 -0
- package/dist/components/SLineChart/index.d.ts +1 -0
- package/dist/components/SLineChart/lineChart.config.d.ts +95 -0
- package/dist/components/SLinearProgress/README.md +16 -1
- package/dist/components/SLinearProgress/SLinearProgress.d.ts +11 -2
- package/dist/components/SLinearProgress/index.d.ts +1 -1
- package/dist/components/SList/README.md +15 -2
- package/dist/components/SList/SList.d.ts +7 -3
- package/dist/components/SList/index.d.ts +1 -1
- package/dist/components/SListItem/README.md +43 -2
- package/dist/components/SListItem/SListItem.d.ts +8 -2
- package/dist/components/SListItem/index.d.ts +1 -1
- package/dist/components/SLoadingContainer/index.d.ts +1 -1
- package/dist/components/SLoadingContainer/loading.d.ts +41 -6
- package/dist/components/SLoadingModal/README.md +10 -2
- package/dist/components/SLoadingModal/SLoadingModal.d.ts +4 -4
- package/dist/components/SLoadingModal/index.d.ts +1 -1
- package/dist/components/SLoginCard/README.md +37 -0
- package/dist/components/SLoginCard/SLoginCard.d.ts +43 -0
- package/dist/components/SLoginCard/index.d.ts +1 -0
- package/dist/components/SLogo/README.md +103 -0
- package/dist/components/SLogo/SLogo.d.ts +72 -0
- package/dist/components/SLogo/index.d.ts +2 -0
- package/dist/components/SLogo/logo.config.d.ts +29 -0
- package/dist/components/SLogo/logos.d.ts +16 -0
- package/dist/components/SMeatballButton/README.md +67 -0
- package/dist/components/SMeatballButton/SMeatballButton.d.ts +36 -0
- package/dist/components/SMeatballButton/index.d.ts +1 -0
- package/dist/components/SModal/README.md +15 -5
- package/dist/components/SModal/SModal.d.ts +1 -1
- package/dist/components/SNumberInput/README.md +19 -8
- package/dist/components/SNumberInput/SNumberInput.d.ts +49 -7
- package/dist/components/SPage/README.md +105 -5
- package/dist/components/SPage/SPage.d.ts +34 -10
- package/dist/components/SPage/SPageHeader.d.ts +31 -13
- package/dist/components/SPage/index.d.ts +2 -2
- package/dist/components/SPage/page-column.d.ts +34 -0
- package/dist/components/SPage/page-width.d.ts +23 -0
- package/dist/components/SPage/page.config.d.ts +26 -0
- package/dist/components/SPieChart/README.md +93 -0
- package/dist/components/SPieChart/SPieChart.d.ts +73 -0
- package/dist/components/SPieChart/index.d.ts +1 -0
- package/dist/components/SPopover/README.md +15 -0
- package/dist/components/SPopup/README.md +26 -2
- package/dist/components/SPopup/SPopup.d.ts +13 -10
- package/dist/components/SPopup/index.d.ts +1 -1
- package/dist/components/SPortal/README.md +20 -0
- package/dist/components/SRadio/README.md +20 -0
- package/dist/components/SRadioButton/README.md +26 -0
- package/dist/components/SRadioButton/SRadioButton.d.ts +9 -2
- package/dist/components/SRadioCard/README.md +78 -0
- package/dist/components/SRadioCard/SRadioCard.d.ts +29 -0
- package/dist/components/SRadioCard/SRadioCardGroup.d.ts +36 -0
- package/dist/components/SRadioCard/index.d.ts +2 -0
- package/dist/components/SScrollArea/README.md +28 -0
- package/dist/components/SScrollArea/SScrollArea.d.ts +17 -0
- package/dist/components/SSearchInput/README.md +63 -0
- package/dist/components/SSearchInput/SSearchInput.d.ts +52 -0
- package/dist/components/SSearchInput/index.d.ts +1 -0
- package/dist/components/SSectionHeaderCard/README.md +38 -0
- package/dist/components/SSectionHeaderCard/SSectionHeaderCard.d.ts +19 -0
- package/dist/components/SSelect/README.md +64 -11
- package/dist/components/SSelect/SSelect.d.ts +135 -15
- package/dist/components/SSelect/index.d.ts +1 -1
- package/dist/components/SSelect/select.config.d.ts +17 -0
- package/dist/components/SSkeleton/README.md +55 -0
- package/dist/components/SSkeleton/SSkeleton.d.ts +39 -0
- package/dist/components/SSkeleton/index.d.ts +2 -0
- package/dist/components/SSkeleton/skeleton.config.d.ts +22 -0
- package/dist/components/SSplitter/README.md +17 -2
- package/dist/components/SSplitter/SSplitter.d.ts +7 -3
- package/dist/components/SStepper/README.md +26 -0
- package/dist/components/SSwitch/README.md +13 -1
- package/dist/components/SSwitch/SSwitch.d.ts +1 -3
- package/dist/components/SSystemActionButton/README.md +246 -0
- package/dist/components/SSystemActionButton/SSystemActionButton.d.ts +167 -0
- package/dist/components/SSystemActionButton/index.d.ts +2 -0
- package/dist/components/SSystemActionButton/systemActionButton.config.d.ts +93 -0
- package/dist/components/STable/README.md +135 -20
- package/dist/components/STable/STable.d.ts +292 -46
- package/dist/components/STable/index.d.ts +1 -1
- package/dist/components/STableBar/README.md +1 -0
- package/dist/components/STableBar/STableBar.d.ts +8 -1
- package/dist/components/STabs/README.md +13 -1
- package/dist/components/STabs/STabs.d.ts +2 -2
- package/dist/components/STag/README.md +55 -0
- package/dist/components/STag/STag.d.ts +3 -1
- package/dist/components/STag/tag.config.d.ts +1 -1
- package/dist/components/STextLink/README.md +21 -1
- package/dist/components/STextLink/STextLink.d.ts +5 -1
- package/dist/components/STextarea/README.md +12 -5
- package/dist/components/STextarea/STextarea.d.ts +49 -6
- package/dist/components/STimePicker/README.md +19 -2
- package/dist/components/STimePicker/STimePicker.d.ts +36 -6
- package/dist/components/STimePicker/timepicker.config.d.ts +4 -2
- package/dist/components/STimeRangePicker/README.md +31 -2
- package/dist/components/STimeRangePicker/STimeRangePicker.d.ts +35 -6
- package/dist/components/SToast/README.md +25 -1
- package/dist/components/SToast/SToast.d.ts +2 -2
- package/dist/components/SToggle/README.md +8 -0
- package/dist/components/SToggle/index.d.ts +1 -1
- package/dist/components/STooltip/README.md +27 -1
- package/dist/components/STooltip/STooltip.d.ts +1 -1
- package/dist/components/STree/README.md +42 -4
- package/dist/components/STree/STree.d.ts +18 -6
- package/dist/components/STree/STree.examples.d.ts +2 -0
- package/dist/docs/Gallery.d.ts +9 -0
- package/dist/docs/RecipeGallery.d.ts +13 -0
- package/dist/docs/gallery-previews.d.ts +24 -0
- package/dist/fonts/LICENSE.txt +94 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.0.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.1.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.10.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.11.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.12.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.13.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.14.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.15.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.16.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.17.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.18.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.19.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.2.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.20.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.21.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.22.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.23.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.24.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.25.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.26.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.27.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.28.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.29.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.3.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.30.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.31.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.32.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.33.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.34.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.35.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.36.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.37.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.38.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.39.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.4.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.40.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.41.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.42.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.43.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.44.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.45.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.46.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.47.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.48.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.49.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.5.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.50.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.51.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.52.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.53.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.54.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.55.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.56.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.57.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.58.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.59.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.6.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.60.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.61.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.62.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.63.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.64.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.65.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.66.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.67.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.68.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.69.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.7.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.70.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.71.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.72.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.73.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.74.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.75.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.76.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.77.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.78.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.79.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.8.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.80.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.81.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.82.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.83.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.84.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.85.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.86.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.87.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.88.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.89.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.9.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.90.woff2 +0 -0
- package/dist/fonts/woff2-dynamic-subset/PretendardVariable.subset.91.woff2 +0 -0
- package/dist/index.cjs +21789 -10666
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +23 -0
- package/dist/index.js +21704 -10665
- package/dist/index.js.map +1 -1
- package/dist/lib/chart/cartesian.d.ts +56 -0
- package/dist/lib/chart/frame.d.ts +21 -0
- package/dist/lib/chart/hover-dim.d.ts +19 -0
- package/dist/lib/chart/legend.d.ts +21 -0
- package/dist/lib/chart/palette.d.ts +28 -0
- package/dist/lib/chart/radial.d.ts +99 -0
- package/dist/lib/chart/scale.d.ts +26 -0
- package/dist/lib/chart/tooltip.d.ts +60 -0
- package/dist/lib/chart/types.d.ts +29 -0
- package/dist/lib/chart/use-element-size.d.ts +39 -0
- package/dist/lib/date.d.ts +2 -1
- package/dist/lib/depth-filter.d.ts +27 -0
- package/dist/lib/doc-sections.d.ts +35 -0
- package/dist/lib/dropdown-menu.d.ts +19 -0
- package/dist/lib/field-width.d.ts +31 -0
- package/dist/lib/floating-height.d.ts +15 -0
- package/dist/lib/global-overlay.d.ts +5 -0
- package/dist/lib/hover-preview.d.ts +32 -0
- package/dist/lib/inert.d.ts +11 -0
- package/dist/lib/overlay-scrollbar.d.ts +32 -0
- package/dist/lib/row-metrics.d.ts +61 -0
- package/dist/lib/story-docs.d.ts +19 -3
- package/dist/llms-full.txt +9674 -2059
- package/dist/llms.txt +4062 -326
- package/dist/playground/categories.d.ts +19 -0
- package/dist/pretendard.css +937 -0
- package/dist/recipes/AppShell.d.ts +21 -0
- package/dist/recipes/CategoryManagePage.d.ts +1 -0
- package/dist/recipes/ConsultConsolePage.d.ts +1 -0
- package/dist/recipes/ExcelFilePopupPage.d.ts +5 -0
- package/dist/recipes/LoginPage.d.ts +6 -0
- package/dist/recipes/ProductBulkUploadPage.d.ts +1 -0
- package/dist/recipes/ProductCreatePage.d.ts +1 -0
- package/dist/recipes/ProductCreateSectionsPage.d.ts +5 -0
- package/dist/recipes/ProductDetailInlineEditPage.d.ts +9 -0
- package/dist/recipes/ProductDetailPage.d.ts +1 -0
- package/dist/recipes/ProductListChipFilterPage.d.ts +1 -0
- package/dist/recipes/ProductListPage.d.ts +1 -0
- package/dist/recipes/ProductOverlayPage.d.ts +1 -0
- package/dist/recipes/SalesDashboardPage.d.ts +1 -0
- package/dist/recipes/SettingsPage.d.ts +1 -0
- package/dist/recipes/StoreSetupPage.d.ts +1 -0
- package/dist/recipes/TransferOrderPopupPage.d.ts +2 -0
- package/dist/recipes/api.d.ts +220 -0
- package/dist/recipes/recipe-story.d.ts +33 -0
- package/dist/recipes/router.d.ts +9 -0
- package/dist/styles.css +3541 -262
- package/dist/theme.css +598 -28
- package/eslint/index.mjs +44 -35
- package/eslint/lib/class-names.mjs +23 -25
- package/eslint/lib/table-column.mjs +34 -8
- package/eslint/rules/component-group-gap.mjs +32 -30
- package/eslint/rules/divider-vertical-height.mjs +137 -0
- package/eslint/rules/field-width-grade.mjs +69 -52
- package/eslint/rules/no-arbitrary-class.mjs +63 -20
- package/eslint/rules/no-off-scale-spacing.mjs +61 -41
- package/eslint/rules/no-raw-html-control.mjs +38 -36
- package/eslint/rules/prefer-typo-preset.mjs +23 -17
- package/eslint/rules/require-locale-number.mjs +14 -19
- package/eslint/rules/table-column-width.mjs +114 -0
- package/eslint/rules/table-numeric-align.mjs +14 -14
- package/eslint/scale.gen.mjs +6 -3
- package/package.json +19 -5
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
* SDatePicker 계열 컴포넌트가 자체 상한을 갖는다 (B-14)
|
|
18
18
|
*
|
|
19
19
|
* ⚠️ 글자수 ↔ 등급 환산은 아직 디자인 확정본이 없어 토큰 값에서 계산한 잠정치다.
|
|
20
|
-
*
|
|
21
|
-
* 확정표가 오면 GRADES · CHAR_RATIO 를 그 값으로 바꾼다. 두 상수 모두 옵션으로 덮을 수 있다.
|
|
20
|
+
* 확정표가 오면 CHAR_RATIO 를 그 값으로 바꾼다. GRADES · CHAR_RATIO 모두 옵션으로 덮을 수 있다.
|
|
22
21
|
*/
|
|
22
|
+
import { FIELD_WIDTHS } from '../scale.gen.mjs';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* 폭 등급 (px).
|
|
26
|
-
*
|
|
25
|
+
* 폭 등급 (px). `--cmp-field-width-*` 토큰에서 scale.gen.mjs 를 거쳐 들어온다 —
|
|
26
|
+
* 컴포넌트(`SFieldWidth`)와 이 규칙이 같은 소스를 본다. 여기에 숫자를 적지 않는다.
|
|
27
27
|
*/
|
|
28
|
-
export const GRADES =
|
|
28
|
+
export const GRADES = FIELD_WIDTHS;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* 글자 하나가 차지하는 폭 (font-size 대비 비율).
|
|
@@ -50,26 +50,26 @@ export const CHAR_RATIO = { narrow: 0.55, wide: 1 };
|
|
|
50
50
|
*/
|
|
51
51
|
export const COMPONENTS = {
|
|
52
52
|
SInput: {
|
|
53
|
-
lengthProp:
|
|
53
|
+
lengthProp: 'maxLength',
|
|
54
54
|
font: { sm: 12, md: 14 },
|
|
55
55
|
chrome: { sm: 26, md: 34 },
|
|
56
56
|
korean: true,
|
|
57
|
-
grades: [
|
|
57
|
+
grades: ['sm', 'md', 'lg', 'xl'],
|
|
58
58
|
},
|
|
59
59
|
SBarcodeInput: {
|
|
60
|
-
lengthProp:
|
|
60
|
+
lengthProp: 'maxLength',
|
|
61
61
|
font: { sm: 12, md: 14 },
|
|
62
62
|
chrome: { sm: 26, md: 34 },
|
|
63
63
|
korean: false, // 바코드는 영숫자다
|
|
64
|
-
grades: [
|
|
64
|
+
grades: ['sm', 'md', 'lg', 'xl'],
|
|
65
65
|
},
|
|
66
66
|
SNumberInput: {
|
|
67
|
-
lengthProp:
|
|
67
|
+
lengthProp: 'max',
|
|
68
68
|
font: { sm: 12, md: 14 },
|
|
69
69
|
chrome: { sm: 26, md: 34 },
|
|
70
70
|
chromeStepper: { sm: 66, md: 82 },
|
|
71
71
|
korean: false,
|
|
72
|
-
grades: [
|
|
72
|
+
grades: ['xs', 'sm', 'md', 'lg', 'xl'], // xs 는 숫자 필드 전용 등급이다
|
|
73
73
|
},
|
|
74
74
|
};
|
|
75
75
|
|
|
@@ -89,7 +89,7 @@ export function smallestGradeFor(spec, size, len, ratio, grades = GRADES) {
|
|
|
89
89
|
|
|
90
90
|
/** JSX 속성 노드 */
|
|
91
91
|
function attr(node, name) {
|
|
92
|
-
return node.attributes.find(a => a.type ===
|
|
92
|
+
return node.attributes.find(a => a.type === 'JSXAttribute' && a.name?.name === name);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
/**
|
|
@@ -103,8 +103,8 @@ function literal(node, name) {
|
|
|
103
103
|
if (!a) return undefined;
|
|
104
104
|
const v = a.value;
|
|
105
105
|
if (!v) return true; // <SNumberInput useButton /> 같은 boolean shorthand 는 true 다
|
|
106
|
-
if (v.type ===
|
|
107
|
-
if (v.type ===
|
|
106
|
+
if (v.type === 'Literal') return v.value;
|
|
107
|
+
if (v.type === 'JSXExpressionContainer' && v.expression.type === 'Literal') {
|
|
108
108
|
return v.expression.value;
|
|
109
109
|
}
|
|
110
110
|
return null;
|
|
@@ -118,20 +118,22 @@ function digitsOf(max) {
|
|
|
118
118
|
|
|
119
119
|
export default {
|
|
120
120
|
meta: {
|
|
121
|
-
type:
|
|
121
|
+
type: 'problem',
|
|
122
122
|
docs: {
|
|
123
|
-
description:
|
|
123
|
+
description: '필드 폭을 maxLength(스키마 상한) 기준 등급으로 고정',
|
|
124
124
|
},
|
|
125
|
+
// px → 등급 이름 치환만 자동으로 고친다. 등급 선택 자체는 스키마를 봐야 하므로 손대지 않는다.
|
|
126
|
+
fixable: 'code',
|
|
125
127
|
schema: [
|
|
126
128
|
{
|
|
127
|
-
type:
|
|
129
|
+
type: 'object',
|
|
128
130
|
properties: {
|
|
129
131
|
/** 폭 등급 px 재정의 — 디자인 확정본이 오면 여기로 덮는다 */
|
|
130
|
-
grades: { type:
|
|
132
|
+
grades: { type: 'object', additionalProperties: { type: 'number' } },
|
|
131
133
|
/** 글자폭 비율 재정의 */
|
|
132
134
|
charRatio: {
|
|
133
|
-
type:
|
|
134
|
-
properties: { narrow: { type:
|
|
135
|
+
type: 'object',
|
|
136
|
+
properties: { narrow: { type: 'number' }, wide: { type: 'number' } },
|
|
135
137
|
additionalProperties: false,
|
|
136
138
|
},
|
|
137
139
|
},
|
|
@@ -140,19 +142,21 @@ export default {
|
|
|
140
142
|
],
|
|
141
143
|
messages: {
|
|
142
144
|
noGrade:
|
|
143
|
-
|
|
145
|
+
'`{{lengthProp}}={{len}}` 로 상한이 정해진 필드인데 `width` 가 없어 행 전체를 차지합니다. `width="{{suggest}}"`({{suggestPx}}px) 등급으로 고정하세요. (§1-2)',
|
|
144
146
|
offGrade:
|
|
145
|
-
|
|
147
|
+
'`width={{{width}}}` 는 폭 등급이 아닙니다. {{gradeList}} 중 하나이거나, 상한이 없으면 `width="100%"` 여야 합니다. (§1-2)',
|
|
148
|
+
pxGrade:
|
|
149
|
+
'`width={{{width}}}` 는 {{grade}} 등급의 px 값입니다. `width="{{grade}}"` 로 등급을 주세요 — px 를 박으면 `--cmp-field-width-*` 가 바뀌어도 이 화면만 그 자리에 남습니다. (§1-2)',
|
|
146
150
|
noBound:
|
|
147
|
-
|
|
151
|
+
'`width` 로 폭을 고정했는데 `{{lengthProp}}` 이 없습니다. 폭의 근거가 스키마 상한이므로, 상한이 없으면 행 전체(`width="100%"` 또는 생략)로 둡니다. (§1-2)',
|
|
148
152
|
tooNarrow:
|
|
149
|
-
|
|
153
|
+
'`{{lengthProp}}={{len}}` 이 {{grade}} 등급({{gradePx}}px)에 담기지 않습니다. `width="{{suggest}}"`({{suggestPx}}px) 이상이 필요합니다. (§1-2)',
|
|
150
154
|
tooWide:
|
|
151
|
-
|
|
155
|
+
'`{{lengthProp}}={{len}}` 은 {{suggest}} 등급({{suggestPx}}px)으로 충분한데 {{grade}} 등급({{gradePx}}px)을 주었습니다. 폭은 상한에 맞춥니다. (§1-2)',
|
|
152
156
|
overMax:
|
|
153
|
-
|
|
157
|
+
'`{{lengthProp}}={{len}}` 은 최대 등급 xl({{xl}}px)로도 담기지 않습니다. 행 전체(`width="100%"`)로 둡니다. (§1-2)',
|
|
154
158
|
fullWidthBounded:
|
|
155
|
-
|
|
159
|
+
'`{{lengthProp}}={{len}}` 로 상한이 정해져 있으므로 `width="100%"` 가 아니라 `width="{{suggest}}"`({{suggestPx}}px) 등급으로 고정합니다. 행 전체는 상한이 없거나 xl 을 넘을 때만 씁니다. (§1-2)',
|
|
156
160
|
},
|
|
157
161
|
},
|
|
158
162
|
|
|
@@ -162,18 +166,19 @@ export default {
|
|
|
162
166
|
|
|
163
167
|
return {
|
|
164
168
|
JSXOpeningElement(node) {
|
|
165
|
-
if (node.name.type !==
|
|
169
|
+
if (node.name.type !== 'JSXIdentifier') return;
|
|
166
170
|
const base = COMPONENTS[node.name.name];
|
|
167
171
|
if (!base) return;
|
|
168
172
|
|
|
169
173
|
// spread 가 있으면 width·maxLength 가 그 안에 있을 수 있어 판단하지 않는다
|
|
170
|
-
if (node.attributes.some(a => a.type ===
|
|
174
|
+
if (node.attributes.some(a => a.type === 'JSXSpreadAttribute')) return;
|
|
171
175
|
|
|
172
|
-
const size = literal(node,
|
|
176
|
+
const size = literal(node, 'size') === 'md' ? 'md' : 'sm';
|
|
173
177
|
// 스테퍼가 붙으면 글자가 쓸 수 있는 폭이 크게 줄어든다 (useButton 기본값은 false)
|
|
174
|
-
const spec =
|
|
175
|
-
|
|
176
|
-
|
|
178
|
+
const spec =
|
|
179
|
+
literal(node, 'useButton') === true && base.chromeStepper
|
|
180
|
+
? { ...base, chrome: base.chromeStepper }
|
|
181
|
+
: base;
|
|
177
182
|
|
|
178
183
|
const capacityAt = (grade, r) => capacity(spec, size, grade, r, grades);
|
|
179
184
|
const smallestFor = (len, r) => smallestGradeFor(spec, size, len, r, grades);
|
|
@@ -185,18 +190,14 @@ export default {
|
|
|
185
190
|
const rawLen = literal(node, spec.lengthProp);
|
|
186
191
|
if (rawLen === null) return; // 변수로 넘긴 상한 — 판단 불가
|
|
187
192
|
const len =
|
|
188
|
-
rawLen === undefined
|
|
189
|
-
? undefined
|
|
190
|
-
: spec.lengthProp === "max"
|
|
191
|
-
? digitsOf(rawLen)
|
|
192
|
-
: rawLen;
|
|
193
|
+
rawLen === undefined ? undefined : spec.lengthProp === 'max' ? digitsOf(rawLen) : rawLen;
|
|
193
194
|
if (len !== undefined && (!Number.isFinite(len) || len <= 0)) return;
|
|
194
195
|
|
|
195
|
-
const rawWidth = literal(node,
|
|
196
|
+
const rawWidth = literal(node, 'width');
|
|
196
197
|
if (rawWidth === null) return; // 변수로 넘긴 폭 — 판단 불가
|
|
197
198
|
|
|
198
|
-
const reportNode = attr(node,
|
|
199
|
-
const gradeList = spec.grades.map(g => `${g}(${grades[g]})`).join(
|
|
199
|
+
const reportNode = attr(node, 'width') ?? attr(node, spec.lengthProp) ?? node.name;
|
|
200
|
+
const gradeList = spec.grades.map(g => `${g}(${grades[g]})`).join(' · ');
|
|
200
201
|
|
|
201
202
|
/* ── width 가 없다 ── */
|
|
202
203
|
if (rawWidth === undefined) {
|
|
@@ -205,32 +206,37 @@ export default {
|
|
|
205
206
|
if (!suggest) return; // xl 로도 안 담긴다 → 행 전체가 맞다
|
|
206
207
|
context.report({
|
|
207
208
|
node: reportNode,
|
|
208
|
-
messageId:
|
|
209
|
+
messageId: 'noGrade',
|
|
209
210
|
data: { lengthProp: spec.lengthProp, len: rawLen, suggest, suggestPx: grades[suggest] },
|
|
210
211
|
});
|
|
211
212
|
return;
|
|
212
213
|
}
|
|
213
214
|
|
|
214
215
|
/* ── width="100%" ── */
|
|
215
|
-
if (rawWidth ===
|
|
216
|
+
if (rawWidth === '100%') {
|
|
216
217
|
if (len === undefined) return; // 상한 없음 + 행 전체 = 규칙대로다
|
|
217
218
|
const suggest = smallestFor(len, wide);
|
|
218
219
|
if (!suggest) return; // xl 초과 → 행 전체가 맞다
|
|
219
220
|
context.report({
|
|
220
221
|
node: reportNode,
|
|
221
|
-
messageId:
|
|
222
|
+
messageId: 'fullWidthBounded',
|
|
222
223
|
data: { lengthProp: spec.lengthProp, len: rawLen, suggest, suggestPx: grades[suggest] },
|
|
223
224
|
});
|
|
224
225
|
return;
|
|
225
226
|
}
|
|
226
227
|
|
|
227
|
-
/* ── width 가
|
|
228
|
-
|
|
229
|
-
const
|
|
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));
|
|
230
236
|
if (!grade) {
|
|
231
237
|
context.report({
|
|
232
238
|
node: reportNode,
|
|
233
|
-
messageId:
|
|
239
|
+
messageId: 'offGrade',
|
|
234
240
|
data: { width: String(rawWidth), gradeList },
|
|
235
241
|
});
|
|
236
242
|
return;
|
|
@@ -240,7 +246,7 @@ export default {
|
|
|
240
246
|
if (len === undefined) {
|
|
241
247
|
context.report({
|
|
242
248
|
node: reportNode,
|
|
243
|
-
messageId:
|
|
249
|
+
messageId: 'noBound',
|
|
244
250
|
data: { lengthProp: spec.lengthProp },
|
|
245
251
|
});
|
|
246
252
|
return;
|
|
@@ -252,14 +258,14 @@ export default {
|
|
|
252
258
|
if (!suggest) {
|
|
253
259
|
context.report({
|
|
254
260
|
node: reportNode,
|
|
255
|
-
messageId:
|
|
261
|
+
messageId: 'overMax',
|
|
256
262
|
data: { lengthProp: spec.lengthProp, len: rawLen, xl: grades.xl },
|
|
257
263
|
});
|
|
258
264
|
return;
|
|
259
265
|
}
|
|
260
266
|
context.report({
|
|
261
267
|
node: reportNode,
|
|
262
|
-
messageId:
|
|
268
|
+
messageId: 'tooNarrow',
|
|
263
269
|
data: {
|
|
264
270
|
lengthProp: spec.lengthProp,
|
|
265
271
|
len: rawLen,
|
|
@@ -277,7 +283,7 @@ export default {
|
|
|
277
283
|
if (enough && grades[enough] < grades[grade]) {
|
|
278
284
|
context.report({
|
|
279
285
|
node: reportNode,
|
|
280
|
-
messageId:
|
|
286
|
+
messageId: 'tooWide',
|
|
281
287
|
data: {
|
|
282
288
|
lengthProp: spec.lengthProp,
|
|
283
289
|
len: rawLen,
|
|
@@ -287,6 +293,17 @@ export default {
|
|
|
287
293
|
suggestPx: grades[enough],
|
|
288
294
|
},
|
|
289
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
|
+
});
|
|
290
307
|
}
|
|
291
308
|
},
|
|
292
309
|
};
|
|
@@ -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
|
};
|
|
@@ -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
|
},
|