merge: sync chart package with latest main
This commit is contained in:
commit
bcce6590ec
132 files changed
+2553
-1170
No files matched your search
+97
-2
@@ -28,13 +28,108 @@ toolbarStyle.textContent = `
|
||||
`
|
||||
document.head.appendChild(toolbarStyle)
|
||||
|
||||
// Sidebar display names only. Story titles, Story IDs and storySort stay English; items not listed keep item.name.
|
||||
const koreanLabels = {
|
||||
foundation: '기본 요소',
|
||||
components: '컴포넌트',
|
||||
'components-form': '폼 요소',
|
||||
'components-navigation': '내비게이션',
|
||||
'components-overlay': '오버레이',
|
||||
'components-data-display': '데이터 표시',
|
||||
'components-disclosure': '영역 확장·조절',
|
||||
'components-search-date': '검색·날짜',
|
||||
'components-feedback': '알림·피드백',
|
||||
'components-form-button': '버튼',
|
||||
'components-form-input': '입력창',
|
||||
'components-form-textarea': '여러 줄 입력창',
|
||||
'components-form-select': '선택 목록',
|
||||
'components-form-checkbox': '체크박스',
|
||||
'components-form-radio-group': '라디오 버튼 그룹',
|
||||
'components-form-switch': '스위치',
|
||||
'components-form-slider': '슬라이더',
|
||||
'components-form-toggle': '토글 버튼',
|
||||
'components-navigation-tabs': '탭',
|
||||
'components-navigation-breadcrumb': '이동 경로',
|
||||
'components-navigation-pagination': '페이지네이션',
|
||||
'components-navigation-navigation-menu': '내비게이션 메뉴',
|
||||
'components-navigation-menubar': '메뉴바',
|
||||
'components-overlay-dialog': '대화상자',
|
||||
'components-overlay-alert-dialog': '확인·경고 대화상자',
|
||||
'components-overlay-sheet': '시트 패널',
|
||||
'components-overlay-drawer': '드로어',
|
||||
'components-overlay-dropdown-menu': '드롭다운 메뉴',
|
||||
'components-overlay-context-menu': '컨텍스트 메뉴',
|
||||
'components-overlay-popover': '팝오버',
|
||||
'components-overlay-tooltip': '툴팁',
|
||||
'components-overlay-hover-card': '호버 카드',
|
||||
'components-data-display-card': '카드',
|
||||
'components-data-display-table': '테이블',
|
||||
'components-data-display-badge': '배지',
|
||||
'components-data-display-avatar': '아바타',
|
||||
'components-data-display-progress': '진행률',
|
||||
'components-data-display-skeleton': '스켈레톤',
|
||||
'components-data-display-separator': '구분선',
|
||||
'components-data-display-aspect-ratio': '화면 비율',
|
||||
'components-data-display-carousel': '캐러셀',
|
||||
'components-data-display-scroll-area': '스크롤 영역',
|
||||
'components-disclosure-accordion': '아코디언',
|
||||
'components-disclosure-collapsible': '접기·펼치기',
|
||||
'components-disclosure-resizable': '크기 조절',
|
||||
'components-search-date-command': '명령어 검색',
|
||||
'components-search-date-combobox': '콤보박스',
|
||||
'components-search-date-calendar': '달력',
|
||||
'components-search-date-date-picker': '날짜 선택기',
|
||||
'components-feedback-alert': '알림 메시지',
|
||||
'components-feedback-sonner': '토스트 알림',
|
||||
patterns: 'UI 패턴',
|
||||
'patterns-data': '데이터 조회',
|
||||
'patterns-data-data-table': '데이터 테이블',
|
||||
'patterns-data-filter-bar': '필터 바',
|
||||
'patterns-layout': '화면 구성',
|
||||
'patterns-layout-gnb': '전체 메뉴 (GNB)',
|
||||
'patterns-layout-lnb': '좌측 메뉴 (LNB)',
|
||||
'patterns-layout-dashboard-layout': '대시보드',
|
||||
'patterns-layout-page-header': '페이지 헤더',
|
||||
chart: '차트',
|
||||
'chart-bar-chart--bar': '막대 차트',
|
||||
'chart-line-chart--line': '선 차트',
|
||||
'chart-donut-chart--donut': '도넛 차트',
|
||||
'chart-pie-chart--pie': '원형 차트',
|
||||
'chart-radar-chart--radar': '레이더 차트',
|
||||
'chart-area-chart--area': '영역 차트',
|
||||
'chart-radial-chart--radial': '원형 막대 차트',
|
||||
sw: 'SW UI',
|
||||
'sw-header': '헤더',
|
||||
'sw-header--overview': 'SW 헤더',
|
||||
'sw-header--responsive-more': '화면 너비 대응',
|
||||
'sw-viewer--responsive': '화면 너비 대응',
|
||||
'sw-step-header--responsive': '화면 너비 대응',
|
||||
'sw-footer--responsive': '화면 너비 대응',
|
||||
'sw-viewer': '뷰어',
|
||||
'sw-viewer--viewer-header': '뷰어 헤더',
|
||||
'sw-step-header': '단계별',
|
||||
'sw-step-header--process-header': '단계별 헤더',
|
||||
'sw-popup': '팝업',
|
||||
}
|
||||
|
||||
// A component with one visible Story is shown as that Story (`<component-id>--all`) under the component's name.
|
||||
// A real Story named "All" under an expanded component keeps its own name.
|
||||
const koreanLabel = (item) => {
|
||||
const hoisted = item.type === 'story' && item.name !== 'All' ? koreanLabels[item.id.replace(/--all$/, '')] : undefined
|
||||
return koreanLabels[item.id] ?? hoisted ?? item.name
|
||||
}
|
||||
|
||||
addons.setConfig({
|
||||
layout: {
|
||||
showPanel: false,
|
||||
showToolbar: false,
|
||||
// LNB width 246px. recentVisibleSizes keeps the same width when the sidebar is collapsed and expanded again.
|
||||
navSize: 246,
|
||||
recentVisibleSizes: { navSize: 246 },
|
||||
},
|
||||
theme: create({
|
||||
base: 'light',
|
||||
brandTitle: 'HM Design System',
|
||||
brandTitle: '한맥 디자인 시스템',
|
||||
brandUrl: './',
|
||||
brandTarget: '_self',
|
||||
fontBase: "'Hanmac Manager Noto Sans KR', 'Noto Sans KR', 'Malgun Gothic', sans-serif",
|
||||
@@ -48,7 +143,7 @@ addons.setConfig({
|
||||
barSelectedColor: '#123328',
|
||||
}),
|
||||
sidebar: {
|
||||
renderLabel: (item) => createElement('span', { className: 'hm-manager-label' }, item.name),
|
||||
renderLabel: (item) => createElement('span', { className: 'hm-manager-label' }, koreanLabel(item)),
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user