@nurihaus/web-design-system 3.11.0 → 3.12.0

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.
Files changed (107) hide show
  1. package/README.md +12 -0
  2. package/dist/.storybook/patterns.d.ts +36 -0
  3. package/dist/.storybook/preview.d.ts +12 -0
  4. package/dist/.storybook/story-kit.d.ts +20 -2
  5. package/dist/ai/components.md +183 -10
  6. package/dist/ai/patterns.md +2899 -0
  7. package/dist/ai/tokens.md +10 -0
  8. package/dist/chunk-6459.js +3 -1
  9. package/dist/chunk-7653.js +4 -0
  10. package/dist/components/asset/asset.d.ts +5 -5
  11. package/dist/components/asset/asset.stories.d.ts +5 -5
  12. package/dist/components/bottom-bar/bottom-bar.stories.d.ts +5 -5
  13. package/dist/components/breadcrumb/breadcrumb.stories.d.ts +1 -0
  14. package/dist/components/button/button.stories.d.ts +1 -0
  15. package/dist/components/check-box/check-box.stories.d.ts +1 -0
  16. package/dist/components/chip-group/chip-group.stories.d.ts +1 -0
  17. package/dist/components/drawer/drawer.stories.d.ts +3 -0
  18. package/dist/components/drop-down/drop-down.stories.d.ts +1 -0
  19. package/dist/components/empty-state/empty-state.stories.d.ts +12 -12
  20. package/dist/components/icon/icon-paths.d.ts +4 -0
  21. package/dist/components/icon/icon.stories.d.ts +1 -1
  22. package/dist/components/list/list-footer.stories.d.ts +8 -8
  23. package/dist/components/list/list-header.stories.d.ts +5 -5
  24. package/dist/components/list/list-row.stories.d.ts +9 -9
  25. package/dist/components/media/base-media.d.ts +2 -4
  26. package/dist/components/media/media-type.d.ts +6 -1
  27. package/dist/components/message/message.stories.d.ts +9 -9
  28. package/dist/components/modal/modal-with-double-button.stories.d.ts +1 -0
  29. package/dist/components/modal/modal.stories.d.ts +3 -0
  30. package/dist/components/notice/notice.stories.d.ts +6 -6
  31. package/dist/components/numeric-spinner/numeric-spinner.stories.d.ts +1 -0
  32. package/dist/components/overlay/overlay.stories.d.ts +1 -1
  33. package/dist/components/pagination/pagination.stories.d.ts +1 -0
  34. package/dist/components/radio/radio.stories.d.ts +1 -0
  35. package/dist/components/rating/rating.stories.d.ts +1 -0
  36. package/dist/components/segmented-control/segmented-control.stories.d.ts +1 -0
  37. package/dist/components/skeleton/skeleton-group.stories.d.ts +1 -1
  38. package/dist/components/skeleton/skeleton.stories.d.ts +7 -7
  39. package/dist/components/slider/slider.stories.d.ts +1 -0
  40. package/dist/components/switch/switch.stories.d.ts +1 -0
  41. package/dist/components/table/table.stories.d.ts +20 -0
  42. package/dist/components/tabs/tabs.stories.d.ts +1 -0
  43. package/dist/components/text-field/text-field.stories.d.ts +1 -1
  44. package/dist/components/toast/toast.stories.d.ts +9 -6
  45. package/dist/components/tooltip/tooltip.stories.d.ts +2 -0
  46. package/dist/components/top/top.stories.d.ts +4 -4
  47. package/dist/components.css +273 -18
  48. package/dist/data-table.js +60 -56
  49. package/dist/docs/patterns/desktop/admin-bulk.stories.d.ts +17 -0
  50. package/dist/docs/patterns/desktop/admin-dashboard.stories.d.ts +16 -0
  51. package/dist/docs/patterns/desktop/admin-detail.stories.d.ts +13 -0
  52. package/dist/docs/patterns/desktop/admin-form.stories.d.ts +16 -0
  53. package/dist/docs/patterns/desktop/admin-list.stories.d.ts +13 -0
  54. package/dist/docs/patterns/desktop/admin-login.stories.d.ts +16 -0
  55. package/dist/docs/patterns/desktop/admin-messages.stories.d.ts +17 -0
  56. package/dist/docs/patterns/desktop/admin-report.stories.d.ts +17 -0
  57. package/dist/docs/patterns/desktop/admin-review.stories.d.ts +16 -0
  58. package/dist/docs/patterns/desktop/admin-settings.stories.d.ts +16 -0
  59. package/dist/docs/patterns/desktop/admin-states.stories.d.ts +18 -0
  60. package/dist/docs/patterns/desktop/admin-wizard.stories.d.ts +17 -0
  61. package/dist/docs/patterns/mobile/chat.stories.d.ts +15 -0
  62. package/dist/docs/patterns/mobile/confirm.stories.d.ts +13 -0
  63. package/dist/docs/patterns/mobile/detail.stories.d.ts +13 -0
  64. package/dist/docs/patterns/mobile/empty.stories.d.ts +15 -0
  65. package/dist/docs/patterns/mobile/feed.stories.d.ts +17 -0
  66. package/dist/docs/patterns/mobile/filter-sheet.stories.d.ts +17 -0
  67. package/dist/docs/patterns/mobile/form.stories.d.ts +13 -0
  68. package/dist/docs/patterns/mobile/home.stories.d.ts +13 -0
  69. package/dist/docs/patterns/mobile/list.stories.d.ts +13 -0
  70. package/dist/docs/patterns/mobile/loading.stories.d.ts +18 -0
  71. package/dist/docs/patterns/mobile/login.stories.d.ts +15 -0
  72. package/dist/docs/patterns/mobile/media.stories.d.ts +16 -0
  73. package/dist/docs/patterns/mobile/notifications.stories.d.ts +15 -0
  74. package/dist/docs/patterns/mobile/profile.stories.d.ts +13 -0
  75. package/dist/docs/patterns/mobile/result.stories.d.ts +15 -0
  76. package/dist/docs/patterns/mobile/review-write.stories.d.ts +17 -0
  77. package/dist/docs/patterns/mobile/rewards.stories.d.ts +19 -0
  78. package/dist/docs/patterns/mobile/search.stories.d.ts +15 -0
  79. package/dist/docs/patterns/mobile/secure-input.stories.d.ts +18 -0
  80. package/dist/docs/patterns/mobile/settings.stories.d.ts +15 -0
  81. package/dist/docs/patterns/mobile/wizard.stories.d.ts +15 -0
  82. package/dist/eslint/README.md +79 -0
  83. package/dist/eslint/index.js +36 -0
  84. package/dist/eslint/lib/ds-jsx.js +203 -0
  85. package/dist/eslint/rules/no-cta-in-list-row.js +18 -0
  86. package/dist/eslint/rules/no-fill-in-card.js +22 -0
  87. package/dist/eslint/rules/no-fill-in-empty-state.js +21 -0
  88. package/dist/eslint/rules/no-nav-with-cta.js +25 -0
  89. package/dist/eslint/rules/no-nested-card.js +18 -0
  90. package/dist/eslint/rules/no-raw-color.js +26 -0
  91. package/dist/eslint/rules/no-raw-radius.js +26 -0
  92. package/dist/eslint/rules/no-sheet-in-modal.js +23 -0
  93. package/dist/eslint/rules/one-primary-fill.js +20 -0
  94. package/dist/eslint/rules/single-top.js +20 -0
  95. package/dist/index.js +108 -68
  96. package/dist/media-thumbnail.js +2 -0
  97. package/dist/media-viewer.js +2 -0
  98. package/dist/pagination.js +32 -8
  99. package/dist/scripts/patterns-doc.d.mts +26 -0
  100. package/dist/search-field.js +3 -3
  101. package/dist/styles.css +243 -17
  102. package/dist/text-field.js +3 -3
  103. package/dist/tokens/generated/primitive.d.ts +4 -0
  104. package/dist/tokens.css +3 -0
  105. package/dist/tokens.js +4 -0
  106. package/package.json +7 -4
  107. package/dist/.storybook/migration.d.ts +0 -1
@@ -0,0 +1,17 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ /** 고른 행이 없을 때. 바닥 바가 없고 어드민 목록과 같은 화면이다 */
15
+ export declare const NoSelection: Story;
16
+ /** 승인을 누른 뒤 처리 중. 승인은 loading, 반려와 체크는 막힌다. 끝나면 바가 사라지고 Toast 가 뜬다 */
17
+ export declare const Processing: Story;
@@ -0,0 +1,16 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ /** 할 일과 알릴 것이 있는 평소 화면 */
14
+ export declare const Default: Story;
15
+ /** 할 일을 다 끝냈을 때. 할 일 카드 안이 EmptyState success 가 되고 Notice 는 빠진다(무드 규칙 10 · 12) */
16
+ export declare const AllDone: Story;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
@@ -0,0 +1,16 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ /** 새 캠페인을 채우는 중인 평소 화면 */
14
+ export declare const Default: Story;
15
+ /** 저장이 막혔을 때. 막힌 칸은 isError + helperText, 왼쪽 위 danger Notice 하나(무드 규칙 7 · 12) */
16
+ export declare const SaveBlocked: Story;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
@@ -0,0 +1,16 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ /** 처음 들어온 로그인 화면 */
14
+ export declare const Default: Story;
15
+ /** 로그인이 막혔을 때. 칸 위 danger Notice 하나와 두 칸 isError. 어느 칸이 틀렸는지는 알리지 않는다 */
16
+ export declare const Failed: Story;
@@ -0,0 +1,17 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ /** 대화를 고르기 전. 오른쪽 카드에는 EmptyState 하나만 놓는다(무드 규칙 10) */
15
+ export declare const NoConversation: Story;
16
+ /** 긴 메시지. 말풍선은 줄바꿈을 그대로 보이고, 목록 행의 긴 이름 · 마지막 메시지는 한 줄로 잘린다 */
17
+ export declare const LongMessages: Story;
@@ -0,0 +1,17 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ /** 첫 게시물 전. 차트 줄과 표 카드가 EmptyState 하나가 되고 수치 타일은 0 으로 남는다(무드 규칙 10) */
15
+ export declare const NoData: Story;
16
+ /** 기간이 길 때. 막대가 12개를 넘어 첫 · 끝 라벨만 보이고, 표는 10행에 다섯 페이지다 */
17
+ export declare const LongPeriod: Story;
@@ -0,0 +1,16 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ /** 검수 중인 제출물을 읽는 평소 화면 */
14
+ export declare const Default: Story;
15
+ /** 반려를 눌렀을 때. 사유는 화면에 먼저 적고, 대화상자는 한 번 묻기만 한다(confirm 패턴) */
16
+ export declare const RejectConfirm: Story;
@@ -0,0 +1,16 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ /** 일반 탭. 워크스페이스 정보 · 운영 스위치 · 위험 영역 */
14
+ export declare const Default: Story;
15
+ /** 권한 탭. 역할은 행마다 DropDown 이고 바꾸면 바로 반영된다 */
16
+ export declare const Members: Story;
@@ -0,0 +1,18 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ /** 필터 결과가 0건일 때. action 은 필터 지우기 neutral outline 하나(빈 상태 패턴의 데스크톱) */
14
+ export declare const Default: Story;
15
+ /** 처음 불러오는 동안. 표 자리만 SkeletonGroup table 이고 필터 줄은 그대로다 */
16
+ export declare const Loading: Story;
17
+ /** 불러오지 못했을 때. warning 아이콘 · neutral 원 · 다시 시도 weak(무드 규칙 10) */
18
+ export declare const LoadFailed: Story;
@@ -0,0 +1,17 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ /** 마지막 단계. 폼 대신 요약과 안내 하나, 주 행동은 "만들기" 다 */
15
+ export declare const LastStep: Story;
16
+ /** "다음" 을 눌렀는데 값이 틀렸을 때. 오류는 칸 아래 한 줄이고 Toast 로 알리지 않는다(무드 규칙 7) */
17
+ export declare const ValidationError: Story;
@@ -0,0 +1,15 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ /** 긴 글. 브랜드 이름이 길면 제목이 줄을 바꾸고, 말풍선은 줄바꿈과 끊김 없는 링크를 폭 안에서 접는다 */
15
+ export declare const LongText: Story;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
@@ -0,0 +1,15 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ /** 불러오지 못했을 때. 아이콘은 warning, 원은 neutral, 버튼은 다시 시도(무드 규칙 10) */
15
+ export declare const LoadFailed: Story;
@@ -0,0 +1,17 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ /** 사진 없는 글만. 둘째 글은 제목 두 줄 · 본문 세 줄 말줄임을 본다 */
15
+ export declare const TextOnly: Story;
16
+ /** 글이 하나도 없을 때. 글 자리에 EmptyState, 버튼은 weak(무드 규칙 10) */
17
+ export declare const Empty: Story;
@@ -0,0 +1,17 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ /** 적용한 뒤 시트가 닫힌 목록. 적용한 조건은 Tag 로 남고 하나씩 지운다 */
15
+ export declare const Applied: Story;
16
+ /** 조건에 맞는 캠페인이 없을 때. EmptyState 의 필터 결과 없음 상황 그대로다(무드 규칙 10) */
17
+ export declare const NoMatch: Story;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
@@ -0,0 +1,18 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ /** 목록 화면. Top · 검색 · 칩 · 탭 바는 진짜, 행 자리만 뼈대 다섯 줄 */
14
+ export declare const Default: Story;
15
+ /** 홈 화면. 퀵 메뉴 · 섹션 제목은 진짜, 수치 카드 안 값과 목록 행만 뼈대 */
16
+ export declare const Home: Story;
17
+ /** 상세 화면. 목록에서 넘어온 이름은 Top 에 진짜로, 큰 이미지 · 요약 두 줄 · 본문 네 줄은 뼈대, 주 행동은 disabled */
18
+ export declare const Detail: Story;
@@ -0,0 +1,15 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ /** 비밀번호가 틀렸을 때. 오류는 그 칸 아래 한 줄이다(무드 규칙 7) */
15
+ export declare const PasswordError: Story;
@@ -0,0 +1,16 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ export declare const ViewerOpen: Story;
15
+ /** 아직 제출한 콘텐츠가 없을 때. 격자 자리에 EmptyState, 버튼은 weak(무드 규칙 10) */
16
+ export declare const Empty: Story;
@@ -0,0 +1,15 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ /** 소식이 하나도 없을 때. 빈 목록이라 버튼이 없다(EmptyState usage 상황 표) */
15
+ export declare const Empty: Story;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
@@ -0,0 +1,15 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ /** 신청하지 못했을 때. 경고 아이콘에 회색 원, 주 행동은 다시 시도, 홈은 글자 버튼으로 내린다(무드 규칙 1·10) */
15
+ export declare const Failed: Story;
@@ -0,0 +1,17 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ /** 후기가 최소 글자보다 짧을 때. 오류는 TextArea 의 isError + helperText 한 줄(무드 규칙 7) */
15
+ export declare const TooShort: Story;
16
+ /** 제출을 누른 뒤 보내는 중. 같은 버튼이 글자 폭을 지킨 채 loading 을 띄운다 */
17
+ export declare const Submitting: Story;
@@ -0,0 +1,19 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ /** 내역이 하나도 없을 때. 잔액 카드와 기간 전환은 두고 내역 자리만 EmptyState(무드 규칙 10) */
15
+ export declare const Empty: Story;
16
+ /**
17
+ * 출금 신청 시트가 열린 상태. 열린 시트는 포커스를 가두고 바깥 조작을 막아서 Docs 페이지에서는 빼고 캔버스에서만 본다
18
+ */
19
+ export declare const WithdrawSheet: Story;
@@ -0,0 +1,15 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ /** 결과가 0건일 때. 빈 상태 아래에 추천을 남겨 갈 곳을 준다(무드 규칙 10) */
15
+ export declare const NoResults: Story;
@@ -0,0 +1,18 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ /** 여섯 자리 중 둘을 누른 상태. 키패드를 누르면 점이 채워지고 지워진다 */
14
+ export declare const Default: Story;
15
+ /** 틀린 비밀번호. 점을 비우고 빨간 글 한 줄로만 알린다. 흔들림은 없다(무드 규칙 7) */
16
+ export declare const WrongPin: Story;
17
+ /** 영문이 섞인 비밀번호. 칸은 readOnly 로 기기 자판을 막고 FullSecureKeypad 가 입력 완료 버튼까지 그린다 */
18
+ export declare const Alphanumeric: Story;
@@ -0,0 +1,15 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ /** 푸시 알림을 끈 상태. 딸린 스위치는 disabled 로 막고 왜 막혔는지 description 한 줄로 알린다(무드 규칙 6) */
15
+ export declare const PushOff: Story;
@@ -0,0 +1,15 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ docs: {
7
+ page: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ /** 마지막 단계. 오른쪽 버튼이 "제출" 이 되고 제출 전 안내 Notice 하나를 둔다(무드 규칙 1·12) */
15
+ export declare const LastStep: Story;
@@ -0,0 +1,79 @@
1
+ # @nurihaus/web-design-system/eslint
2
+
3
+ 무드 규칙(`docs/patterns/mood.md`) 가운데 코드로 잡히는 금지 조합을 ESLint 경고로 보여 주는 플러그인이다. 디자인 시스템 패키지에 같이 들어 있어 따로 설치하지 않는다. ESLint 9 flat config 를 쓴다(8.57 의 flat config 도 받는다).
4
+
5
+ ## 설치
6
+
7
+ `eslint.config.mjs` 의 배열에 `configs.recommended` 를 더한다. 규칙은 전부 `warn` 으로 켜진다.
8
+
9
+ ```js
10
+ import ds from '@nurihaus/web-design-system/eslint';
11
+
12
+ export default [
13
+ // …기존 설정
14
+ ds.configs.recommended,
15
+ ];
16
+ ```
17
+
18
+ ## 레거시 레포에는 돌지 않는다
19
+
20
+ 플러그인은 디자인 시스템 패키지 안에 들어 있고 `@nurihaus/web-design-system/eslint` 로만 들어온다. 그래서 이 export 가 없는 버전(3.11 미만, 2.x 전부)을 쓰는 레포는 import 자체가 안 되고 규칙도 돌지 않는다. 레거시 `.eslintrc` 설정도 받지 않는다(flat config 전용). 레거시 레포가 이 규칙을 받는 길은 패키지를 올리고 `eslint.config.mjs` 에 더하는 것뿐이다.
21
+
22
+ 한 저장소에서 앱마다 디자인 시스템 버전이 다르면(모노레포), export 가 있는 앱에서만 더한다.
23
+
24
+ ```js
25
+ const ds = await import('@nurihaus/web-design-system/eslint').then((m) => m.default, () => null);
26
+
27
+ export default [
28
+ // …기존 설정
29
+ ...(ds ? [ds.configs.recommended] : []),
30
+ ];
31
+ ```
32
+
33
+ 이 레포의 `eslint/scripts/lint-consumer.mjs` 는 레거시 레포에도 돌릴 수 있지만, 그건 여기서 오탐을 보려고 손으로 돌리는 검사 도구다. 소비 레포의 lint · CI 에는 아무 영향이 없다.
34
+
35
+ ## 경고를 error 로 올리기
36
+
37
+ 막고 싶은 규칙만 recommended 뒤에서 `error` 로 덮는다. 규칙 이름 앞에는 `nuri-ds/` 를 붙인다.
38
+
39
+ ```js
40
+ export default [
41
+ ds.configs.recommended,
42
+ {
43
+ rules: {
44
+ 'nuri-ds/one-primary-fill': 'error',
45
+ 'nuri-ds/no-raw-color': 'error',
46
+ },
47
+ },
48
+ ];
49
+ ```
50
+
51
+ ## 규칙
52
+
53
+ | 규칙 | 잡는 것 | 근거 |
54
+ | --- | --- | --- |
55
+ | `one-primary-fill` | 같이 그려지는 primary fill `CTAButton` 이 둘 이상. 둘째부터 알린다 | 규칙 1 |
56
+ | `no-fill-in-card` | `Card` 안의 primary fill `CTAButton` | 규칙 1·2 |
57
+ | `no-nested-card` | `Card` 안의 `Card` | 규칙 2 |
58
+ | `no-cta-in-list-row` | `ListRow` 안의 `CTAButton`(`trailing` 같은 prop 으로 넘긴 것 포함) | 규칙 1·6 |
59
+ | `no-sheet-in-modal` | `Modal`·`ModalWithDoubleButton` 안의 `BottomSheet` | KAN-10017 |
60
+ | `no-raw-color` | `style={{ … }}` 의 색 속성(`color`·`background*`·`border*`·`outline*`·`fill`·`stroke`·`boxShadow`)에 hex·`rgb()`·`rgba()`·`hsl()` | 규칙 8, ADR 0012 |
61
+ | `no-raw-radius` | `style={{ … }}` 의 `border*Radius` 에 0 이 아닌 숫자나 px 값 | 규칙 14 |
62
+ | `single-top` | 같이 그려지는 `Top` 이 둘 이상 | 규칙 9 |
63
+ | `no-nav-with-cta` | 같이 그려지는 `BottomNav` 와 `BottomCTA` | 규칙 13 |
64
+ | `no-fill-in-empty-state` | `EmptyState` 의 `action` 에 넘긴 primary fill `CTAButton` | 규칙 10 |
65
+
66
+ ## 판정 기준
67
+
68
+ - 컴포넌트는 `@nurihaus/web-design-system` 이나 그 컴포넌트 경로(`/cta-button` 등)에서 import 한 이름만 본다. 별칭(`import { Card as Panel }`)과 `import * as DS` 도 따라간다. 앱이 만든 `Card`, 다른 라이브러리의 `Modal` 에는 경고하지 않는다.
69
+ - prop 값이 문자열 리터럴일 때만 판단한다. `variant={variant}` 처럼 식이거나 뒤에 `{...props}` 가 오면 세지 않는다.
70
+ - primary fill 은 `CTAButton` 이 실제로 그리는 모양으로 정한다. `color`·`variant` 가 없으면 primary fill 이다. ADR 0011 이전 variant 도 옮겨 읽는다. `variant="primary"` 는 primary fill 이고, `color` 없이 쓴 `variant="ghost"` 는 선 버튼이며, `variant="confirm"` 은 danger fill 이다.
71
+ - "같이 그려진다" 는 이렇게 근사한다. 같은 최상위 함수(컴포넌트) 안에 있어야 한다. 지나온 조건 갈래(`a ? … : …`, `a && …`, `if`)가 같아야 한다. 감싼 오버레이(`Modal`·`BottomSheet`·`Drawer`, 이름이 `Modal`·`Dialog`·`Sheet`·`Drawer` 로 끝나는 컴포넌트)도 같아야 한다. 갈래가 다르면 같이 그려지는지 알 수 없으므로 경고하지 않는다.
72
+
73
+ ## 소비 레포에서 미리 돌려 보기
74
+
75
+ 이 레포에서 아래 명령을 실행한다. 소비 레포에는 아무것도 설치하지 않는다. 소비 레포의 `src` 아래 `.ts`·`.tsx` 파일을 lint 한다. 규칙마다 경고 수와 앞의 경고 몇 개를 찍는다.
76
+
77
+ ```sh
78
+ node eslint/scripts/lint-consumer.mjs ../lounge-admin 5
79
+ ```