sh-ui-cli 0.14.0 → 0.21.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 (162) hide show
  1. package/bin/sh-ui.mjs +6 -0
  2. package/data/changelog/versions.json +354 -0
  3. package/data/registry/flutter/foundation/sh_ui_tokens.dart +385 -0
  4. package/data/registry/flutter/registry.json +336 -0
  5. package/data/registry/flutter/widgets/sh_ui_accordion.dart +255 -0
  6. package/data/registry/flutter/widgets/sh_ui_app_shell.dart +267 -0
  7. package/data/registry/flutter/widgets/sh_ui_avatar.dart +95 -0
  8. package/data/registry/flutter/widgets/sh_ui_badge.dart +82 -0
  9. package/data/registry/flutter/widgets/sh_ui_breadcrumb.dart +107 -0
  10. package/data/registry/flutter/widgets/sh_ui_button.dart +201 -0
  11. package/data/registry/flutter/widgets/sh_ui_card.dart +159 -0
  12. package/data/registry/flutter/widgets/sh_ui_carousel.dart +204 -0
  13. package/data/registry/flutter/widgets/sh_ui_checkbox.dart +154 -0
  14. package/data/registry/flutter/widgets/sh_ui_color_picker.dart +264 -0
  15. package/data/registry/flutter/widgets/sh_ui_combobox.dart +614 -0
  16. package/data/registry/flutter/widgets/sh_ui_context_menu.dart +71 -0
  17. package/data/registry/flutter/widgets/sh_ui_date_picker.dart +648 -0
  18. package/data/registry/flutter/widgets/sh_ui_dialog.dart +567 -0
  19. package/data/registry/flutter/widgets/sh_ui_dropdown_menu.dart +251 -0
  20. package/data/registry/flutter/widgets/sh_ui_file_upload.dart +200 -0
  21. package/data/registry/flutter/widgets/sh_ui_header.dart +488 -0
  22. package/data/registry/flutter/widgets/sh_ui_input.dart +664 -0
  23. package/data/registry/flutter/widgets/sh_ui_label.dart +145 -0
  24. package/data/registry/flutter/widgets/sh_ui_menubar.dart +98 -0
  25. package/data/registry/flutter/widgets/sh_ui_pagination.dart +276 -0
  26. package/data/registry/flutter/widgets/sh_ui_popover.dart +248 -0
  27. package/data/registry/flutter/widgets/sh_ui_progress.dart +47 -0
  28. package/data/registry/flutter/widgets/sh_ui_radio.dart +108 -0
  29. package/data/registry/flutter/widgets/sh_ui_select.dart +904 -0
  30. package/data/registry/flutter/widgets/sh_ui_separator.dart +42 -0
  31. package/data/registry/flutter/widgets/sh_ui_sidebar.dart +1116 -0
  32. package/data/registry/flutter/widgets/sh_ui_skeleton.dart +129 -0
  33. package/data/registry/flutter/widgets/sh_ui_slider.dart +147 -0
  34. package/data/registry/flutter/widgets/sh_ui_spinner.dart +56 -0
  35. package/data/registry/flutter/widgets/sh_ui_switch.dart +109 -0
  36. package/data/registry/flutter/widgets/sh_ui_tabs.dart +329 -0
  37. package/data/registry/flutter/widgets/sh_ui_textarea.dart +126 -0
  38. package/data/registry/flutter/widgets/sh_ui_toast.dart +362 -0
  39. package/data/registry/flutter/widgets/sh_ui_toggle.dart +229 -0
  40. package/data/registry/flutter/widgets/sh_ui_tooltip.dart +62 -0
  41. package/data/registry/react/components/accordion/index.tsx +85 -0
  42. package/data/registry/react/components/accordion/styles.css +94 -0
  43. package/data/registry/react/components/animations/animations.css +51 -0
  44. package/data/registry/react/components/avatar/index.tsx +75 -0
  45. package/data/registry/react/components/avatar/styles.css +36 -0
  46. package/data/registry/react/components/badge/index.tsx +42 -0
  47. package/data/registry/react/components/badge/styles.css +57 -0
  48. package/data/registry/react/components/base/base.css +102 -0
  49. package/data/registry/react/components/breadcrumb/index.tsx +154 -0
  50. package/data/registry/react/components/breadcrumb/styles.css +82 -0
  51. package/data/registry/react/components/breakpoints/breakpoints.css +17 -0
  52. package/data/registry/react/components/button/index.tsx +47 -0
  53. package/data/registry/react/components/button/styles.css +93 -0
  54. package/data/registry/react/components/card/index.tsx +86 -0
  55. package/data/registry/react/components/card/styles.css +73 -0
  56. package/data/registry/react/components/carousel/index.tsx +432 -0
  57. package/data/registry/react/components/carousel/styles.css +155 -0
  58. package/data/registry/react/components/checkbox/index.tsx +98 -0
  59. package/data/registry/react/components/checkbox/styles.css +75 -0
  60. package/data/registry/react/components/code-panel/copy.tsx +56 -0
  61. package/data/registry/react/components/code-panel/index.tsx +193 -0
  62. package/data/registry/react/components/code-panel/styles.css +124 -0
  63. package/data/registry/react/components/color-picker/index.tsx +466 -0
  64. package/data/registry/react/components/color-picker/styles.css +166 -0
  65. package/data/registry/react/components/combobox/index.tsx +167 -0
  66. package/data/registry/react/components/combobox/styles.css +151 -0
  67. package/data/registry/react/components/context-menu/index.tsx +253 -0
  68. package/data/registry/react/components/context-menu/styles.css +140 -0
  69. package/data/registry/react/components/date-picker/index.tsx +757 -0
  70. package/data/registry/react/components/date-picker/styles.css +279 -0
  71. package/data/registry/react/components/dialog/index.tsx +97 -0
  72. package/data/registry/react/components/dialog/styles.css +127 -0
  73. package/data/registry/react/components/dropdown-menu/index.tsx +257 -0
  74. package/data/registry/react/components/dropdown-menu/styles.css +150 -0
  75. package/data/registry/react/components/file-upload/index.tsx +489 -0
  76. package/data/registry/react/components/file-upload/styles.css +170 -0
  77. package/data/registry/react/components/focus-ring/focus-ring.css +23 -0
  78. package/data/registry/react/components/form/context.ts +92 -0
  79. package/data/registry/react/components/form/field.test.tsx +230 -0
  80. package/data/registry/react/components/form/field.tsx +236 -0
  81. package/data/registry/react/components/form/focus-first-error.ts +54 -0
  82. package/data/registry/react/components/form/form.section.test.tsx +58 -0
  83. package/data/registry/react/components/form/form.test.tsx +146 -0
  84. package/data/registry/react/components/form/form.tsx +180 -0
  85. package/data/registry/react/components/form/index.tsx +61 -0
  86. package/data/registry/react/components/form/steps.test.tsx +106 -0
  87. package/data/registry/react/components/form/steps.tsx +193 -0
  88. package/data/registry/react/components/form/store.test.ts +206 -0
  89. package/data/registry/react/components/form/store.ts +318 -0
  90. package/data/registry/react/components/form/styles.css +47 -0
  91. package/data/registry/react/components/form/types.ts +104 -0
  92. package/data/registry/react/components/form/use-sh-ui-form.ts +15 -0
  93. package/data/registry/react/components/form/utils.test.ts +44 -0
  94. package/data/registry/react/components/form/utils.ts +49 -0
  95. package/data/registry/react/components/form/validation.test.ts +67 -0
  96. package/data/registry/react/components/form/validation.ts +64 -0
  97. package/data/registry/react/components/form-rhf/README.md +27 -0
  98. package/data/registry/react/components/form-rhf/index.tsx +289 -0
  99. package/data/registry/react/components/form-rhf/rhf.test.tsx +42 -0
  100. package/data/registry/react/components/form-tanstack/README.md +27 -0
  101. package/data/registry/react/components/form-tanstack/index.tsx +352 -0
  102. package/data/registry/react/components/form-tanstack/tanstack.test.tsx +45 -0
  103. package/data/registry/react/components/form-yup/README.md +22 -0
  104. package/data/registry/react/components/form-yup/index.tsx +50 -0
  105. package/data/registry/react/components/form-yup/yup.test.ts +27 -0
  106. package/data/registry/react/components/header/index.tsx +257 -0
  107. package/data/registry/react/components/header/styles.css +190 -0
  108. package/data/registry/react/components/input/index.tsx +517 -0
  109. package/data/registry/react/components/input/styles.css +203 -0
  110. package/data/registry/react/components/label/index.tsx +54 -0
  111. package/data/registry/react/components/label/styles.css +90 -0
  112. package/data/registry/react/components/menubar/index.tsx +34 -0
  113. package/data/registry/react/components/menubar/styles.css +45 -0
  114. package/data/registry/react/components/pagination/index.tsx +271 -0
  115. package/data/registry/react/components/pagination/styles.css +105 -0
  116. package/data/registry/react/components/popover/index.tsx +115 -0
  117. package/data/registry/react/components/popover/styles.css +65 -0
  118. package/data/registry/react/components/progress/index.tsx +56 -0
  119. package/data/registry/react/components/progress/styles.css +41 -0
  120. package/data/registry/react/components/radio/index.tsx +67 -0
  121. package/data/registry/react/components/radio/styles.css +80 -0
  122. package/data/registry/react/components/select/index.tsx +236 -0
  123. package/data/registry/react/components/select/styles.css +193 -0
  124. package/data/registry/react/components/separator/index.tsx +48 -0
  125. package/data/registry/react/components/separator/styles.css +15 -0
  126. package/data/registry/react/components/sidebar/index.tsx +1084 -0
  127. package/data/registry/react/components/sidebar/styles.css +502 -0
  128. package/data/registry/react/components/skeleton/index.tsx +24 -0
  129. package/data/registry/react/components/skeleton/styles.css +24 -0
  130. package/data/registry/react/components/slider/index.tsx +300 -0
  131. package/data/registry/react/components/slider/styles.css +64 -0
  132. package/data/registry/react/components/spinner/index.tsx +40 -0
  133. package/data/registry/react/components/spinner/styles.css +37 -0
  134. package/data/registry/react/components/switch/index.tsx +41 -0
  135. package/data/registry/react/components/switch/styles.css +83 -0
  136. package/data/registry/react/components/tabs/index.tsx +93 -0
  137. package/data/registry/react/components/tabs/styles.css +148 -0
  138. package/data/registry/react/components/textarea/index.tsx +25 -0
  139. package/data/registry/react/components/textarea/styles.css +54 -0
  140. package/data/registry/react/components/theme/index.tsx +91 -0
  141. package/data/registry/react/components/toast/index.tsx +257 -0
  142. package/data/registry/react/components/toast/styles.css +290 -0
  143. package/data/registry/react/components/toggle/index.tsx +133 -0
  144. package/data/registry/react/components/toggle/styles.css +85 -0
  145. package/data/registry/react/components/tooltip/index.tsx +85 -0
  146. package/data/registry/react/components/tooltip/styles.css +44 -0
  147. package/data/registry/react/components/z-index/z-index.css +16 -0
  148. package/data/registry/react/hooks/use-active-section.ts +104 -0
  149. package/data/registry/react/hooks/use-media-query.ts +27 -0
  150. package/data/registry/react/lib/cn.ts +39 -0
  151. package/data/registry/react/registry.json +835 -0
  152. package/data/summaries/flutter.json +42 -0
  153. package/data/summaries/react.json +50 -0
  154. package/data/tokens/build.mjs +553 -0
  155. package/data/tokens/src/primitives.json +146 -0
  156. package/data/tokens/src/semantic.json +146 -0
  157. package/package.json +13 -4
  158. package/src/add.mjs +13 -12
  159. package/src/list.mjs +3 -11
  160. package/src/mcp.mjs +308 -0
  161. package/src/paths.mjs +52 -0
  162. package/src/remove.mjs +4 -11
@@ -0,0 +1,82 @@
1
+ .sh-ui-breadcrumb {
2
+ font-size: var(--text-sm);
3
+ color: var(--foreground-muted);
4
+ }
5
+
6
+ .sh-ui-breadcrumb__list {
7
+ display: flex;
8
+ align-items: center;
9
+ flex-wrap: wrap;
10
+ gap: 0.375rem;
11
+ margin: 0;
12
+ padding: 0;
13
+ list-style: none;
14
+ }
15
+
16
+ .sh-ui-breadcrumb__item {
17
+ display: inline-flex;
18
+ align-items: center;
19
+ gap: 0.375rem;
20
+ min-width: 0;
21
+ }
22
+
23
+ .sh-ui-breadcrumb__link {
24
+ color: var(--foreground-muted);
25
+ text-decoration: none;
26
+ border-radius: calc(var(--radius) - 2px);
27
+ padding: 0 0.125rem;
28
+ transition: color var(--duration-fast);
29
+ }
30
+
31
+ .sh-ui-breadcrumb__link:hover {
32
+ color: var(--foreground);
33
+ text-decoration: underline;
34
+ text-underline-offset: 3px;
35
+ }
36
+
37
+ .sh-ui-breadcrumb__link:focus-visible {
38
+ outline: var(--border-width-strong) solid var(--foreground);
39
+ outline-offset: 2px;
40
+ }
41
+
42
+ .sh-ui-breadcrumb__page {
43
+ color: var(--foreground);
44
+ font-weight: var(--weight-medium);
45
+ overflow: hidden;
46
+ text-overflow: ellipsis;
47
+ white-space: nowrap;
48
+ }
49
+
50
+ .sh-ui-breadcrumb__separator {
51
+ display: inline-flex;
52
+ align-items: center;
53
+ color: var(--foreground-muted);
54
+ opacity: 0.6;
55
+ }
56
+
57
+ .sh-ui-breadcrumb__ellipsis {
58
+ display: inline-flex;
59
+ align-items: center;
60
+ width: 1.5rem;
61
+ height: 1.5rem;
62
+ justify-content: center;
63
+ color: var(--foreground-muted);
64
+ }
65
+
66
+ .sh-ui-breadcrumb__ellipsis-sr {
67
+ position: absolute;
68
+ width: 1px;
69
+ height: 1px;
70
+ padding: 0;
71
+ margin: -1px;
72
+ overflow: hidden;
73
+ clip: rect(0, 0, 0, 0);
74
+ white-space: nowrap;
75
+ border: 0;
76
+ }
77
+
78
+ @media (prefers-reduced-motion: reduce) {
79
+ .sh-ui-breadcrumb__link {
80
+ transition: none;
81
+ }
82
+ }
@@ -0,0 +1,17 @@
1
+ /* sh-ui breakpoints — 참조용 토큰 + @media 사용 가이드
2
+ *
3
+ * CSS @media 쿼리는 var()를 받지 못한다. 따라서 변수는 "문서/계산용"이고,
4
+ * 실제 미디어 쿼리에는 동일한 값을 직접 적는다.
5
+ *
6
+ * @media (max-width: 40rem) { ... } // sm 이하 (모바일)
7
+ * @media (min-width: 48rem) { ... } // md 이상 (태블릿+)
8
+ * @media (min-width: 64rem) { ... } // lg 이상 (데스크탑)
9
+ * @media (min-width: 80rem) { ... } // xl 이상
10
+ */
11
+
12
+ :root {
13
+ --bp-sm: 40rem; /* 640px — 모바일 경계 */
14
+ --bp-md: 48rem; /* 768px — 태블릿 경계 */
15
+ --bp-lg: 64rem; /* 1024px — 데스크탑 경계 */
16
+ --bp-xl: 80rem; /* 1280px — 와이드 경계 */
17
+ }
@@ -0,0 +1,47 @@
1
+ import * as React from "react";
2
+ import "./styles.css";
3
+
4
+ type Variant = "primary" | "secondary" | "ghost" | "danger" | "link";
5
+ type Size = "sm" | "md" | "lg";
6
+
7
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
8
+ /**
9
+ * 시각적 위계.
10
+ * - `primary` — 페이지의 주요 액션. 한 화면에 하나만 권장.
11
+ * - `secondary` — 보조 액션. 약한 배경 + border.
12
+ * - `ghost` — 배경 없는 hover 강조 액션. 툴바/메뉴 항목에 적합.
13
+ * - `danger` — 파괴적 액션(삭제, 취소 등).
14
+ * - `link` — 텍스트 링크처럼 보이는 인라인 버튼.
15
+ *
16
+ * @default "primary"
17
+ */
18
+ variant?: Variant;
19
+ /**
20
+ * 크기.
21
+ * - `sm` — 조밀한 영역(테이블 행, 툴바)
22
+ * - `md` — 일반
23
+ * - `lg` — CTA·랜딩 영역
24
+ *
25
+ * @default "md"
26
+ */
27
+ size?: Size;
28
+ }
29
+
30
+ /**
31
+ * 사용자 액션을 트리거하는 기본 버튼. variant로 시각적 위계(primary/secondary/ghost/danger/link)를,
32
+ * size로 크기를 결정한다. 페이지 이동 목적이면 anchor를 감싼 `link` variant를 사용할 것.
33
+ */
34
+ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
35
+ ({ variant = "primary", size = "md", className, ...props }, ref) => {
36
+ const classes = [
37
+ "sh-ui-button",
38
+ `sh-ui-button--${variant}`,
39
+ `sh-ui-button--${size}`,
40
+ className,
41
+ ]
42
+ .filter(Boolean)
43
+ .join(" ");
44
+ return <button ref={ref} className={classes} {...props} />;
45
+ },
46
+ );
47
+ Button.displayName = "Button";
@@ -0,0 +1,93 @@
1
+ .sh-ui-button {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ gap: var(--space-2);
6
+ border: 1px solid transparent;
7
+ border-radius: var(--radius);
8
+ font-weight: var(--weight-medium);
9
+ line-height: 1;
10
+ cursor: pointer;
11
+ transition: background-color var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast),
12
+ transform 80ms ease-out, filter 80ms;
13
+ user-select: none;
14
+ -webkit-tap-highlight-color: transparent;
15
+ }
16
+
17
+ .sh-ui-button:disabled {
18
+ opacity: var(--opacity-disabled);
19
+ pointer-events: none;
20
+ }
21
+
22
+ .sh-ui-button:focus-visible {
23
+ outline: var(--border-width-strong) solid var(--foreground);
24
+ outline-offset: 2px;
25
+ }
26
+
27
+ .sh-ui-button:active:not(:disabled) {
28
+ transform: scale(0.97);
29
+ filter: brightness(0.92);
30
+ transition-duration: 40ms;
31
+ }
32
+
33
+ /* sizes */
34
+ .sh-ui-button--sm { height: var(--control-sm); padding: 0 var(--space-3); font-size: var(--text-sm); }
35
+ .sh-ui-button--md { height: var(--control-md); padding: 0 var(--space-4); font-size: var(--text-sm); }
36
+ .sh-ui-button--lg { height: var(--control-lg); padding: 0 var(--space-5); font-size: var(--text-base); }
37
+
38
+ /* 모바일/터치 디바이스: 최소 탭 영역 보장 */
39
+ @media (hover: none) and (pointer: coarse) {
40
+ .sh-ui-button--sm { height: 2.25rem; }
41
+ .sh-ui-button--md { height: 2.75rem; }
42
+ }
43
+
44
+ /* variants */
45
+ .sh-ui-button--primary {
46
+ background-color: var(--primary);
47
+ color: var(--primary-foreground);
48
+ }
49
+ .sh-ui-button--primary:hover { background-color: var(--primary-hover); }
50
+
51
+ .sh-ui-button--secondary {
52
+ background-color: var(--background-muted);
53
+ color: var(--foreground);
54
+ border-color: var(--border);
55
+ }
56
+ .sh-ui-button--secondary:hover { background-color: var(--background-subtle); }
57
+
58
+ .sh-ui-button--ghost {
59
+ background-color: transparent;
60
+ color: var(--foreground);
61
+ }
62
+ .sh-ui-button--ghost:hover { background-color: var(--background-muted); }
63
+
64
+ .sh-ui-button--danger {
65
+ background-color: var(--danger);
66
+ color: var(--danger-foreground);
67
+ }
68
+
69
+ /* link — 배경/테두리 없이 밑줄. size는 font-size만 유지, height/padding 제거 */
70
+ .sh-ui-button--link {
71
+ background-color: transparent;
72
+ color: var(--foreground);
73
+ border-color: transparent;
74
+ height: auto;
75
+ padding: 0;
76
+ text-underline-offset: 3px;
77
+ }
78
+ .sh-ui-button--link:hover { text-decoration: underline; }
79
+ .sh-ui-button--link:active:not(:disabled) {
80
+ transform: none;
81
+ filter: none;
82
+ color: var(--foreground-muted);
83
+ }
84
+
85
+ @media (prefers-reduced-motion: reduce) {
86
+ .sh-ui-button {
87
+ transition: none;
88
+ }
89
+ .sh-ui-button:active:not(:disabled) {
90
+ transform: none;
91
+ filter: none;
92
+ }
93
+ }
@@ -0,0 +1,86 @@
1
+ import * as React from "react";
2
+ import "./styles.css";
3
+
4
+ type DivProps = React.HTMLAttributes<HTMLDivElement>;
5
+
6
+ function mergeClass(base: string, extra?: string) {
7
+ return extra ? `${base} ${extra}` : base;
8
+ }
9
+
10
+ export const Card = React.forwardRef<HTMLDivElement, DivProps>(
11
+ ({ className, ...props }, ref) => (
12
+ <div ref={ref} className={mergeClass("sh-ui-card", className)} {...props} />
13
+ ),
14
+ );
15
+ Card.displayName = "Card";
16
+
17
+ export const CardHeader = React.forwardRef<HTMLDivElement, DivProps>(
18
+ ({ className, ...props }, ref) => (
19
+ <div
20
+ ref={ref}
21
+ data-slot="card-header"
22
+ className={mergeClass("sh-ui-card__header", className)}
23
+ {...props}
24
+ />
25
+ ),
26
+ );
27
+ CardHeader.displayName = "CardHeader";
28
+
29
+ export const CardTitle = React.forwardRef<HTMLDivElement, DivProps>(
30
+ ({ className, ...props }, ref) => (
31
+ <div
32
+ ref={ref}
33
+ className={mergeClass("sh-ui-card__title", className)}
34
+ {...props}
35
+ />
36
+ ),
37
+ );
38
+ CardTitle.displayName = "CardTitle";
39
+
40
+ export const CardDescription = React.forwardRef<HTMLDivElement, DivProps>(
41
+ ({ className, ...props }, ref) => (
42
+ <div
43
+ ref={ref}
44
+ className={mergeClass("sh-ui-card__description", className)}
45
+ {...props}
46
+ />
47
+ ),
48
+ );
49
+ CardDescription.displayName = "CardDescription";
50
+
51
+ /**
52
+ * 헤더 우측에 배치되는 슬롯. CardHeader 내부에서 grid 2번째 컬럼을 차지.
53
+ * CardHeader가 `:has(.sh-ui-card__action)`으로 감지해 레이아웃을 전환한다.
54
+ */
55
+ export const CardAction = React.forwardRef<HTMLDivElement, DivProps>(
56
+ ({ className, ...props }, ref) => (
57
+ <div
58
+ ref={ref}
59
+ className={mergeClass("sh-ui-card__action", className)}
60
+ {...props}
61
+ />
62
+ ),
63
+ );
64
+ CardAction.displayName = "CardAction";
65
+
66
+ export const CardContent = React.forwardRef<HTMLDivElement, DivProps>(
67
+ ({ className, ...props }, ref) => (
68
+ <div
69
+ ref={ref}
70
+ className={mergeClass("sh-ui-card__content", className)}
71
+ {...props}
72
+ />
73
+ ),
74
+ );
75
+ CardContent.displayName = "CardContent";
76
+
77
+ export const CardFooter = React.forwardRef<HTMLDivElement, DivProps>(
78
+ ({ className, ...props }, ref) => (
79
+ <div
80
+ ref={ref}
81
+ className={mergeClass("sh-ui-card__footer", className)}
82
+ {...props}
83
+ />
84
+ ),
85
+ );
86
+ CardFooter.displayName = "CardFooter";
@@ -0,0 +1,73 @@
1
+ .sh-ui-card {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: var(--space-6);
5
+ padding: var(--space-6) 0;
6
+ background: var(--background);
7
+ color: var(--foreground);
8
+ border: 1px solid var(--border);
9
+ border-radius: var(--radius);
10
+ }
11
+
12
+ /* 헤더: 기본은 타이틀/설명 세로 스택. action 있으면 2열 그리드로 전환. */
13
+ .sh-ui-card__header {
14
+ display: grid;
15
+ grid-template-columns: 1fr;
16
+ grid-auto-rows: auto;
17
+ row-gap: 0.375rem;
18
+ padding: 0 var(--space-6);
19
+ }
20
+
21
+ .sh-ui-card__header:has(.sh-ui-card__action) {
22
+ grid-template-columns: 1fr auto;
23
+ }
24
+
25
+ .sh-ui-card__title {
26
+ font-size: var(--text-base);
27
+ font-weight: var(--weight-semibold);
28
+ line-height: 1.25;
29
+ letter-spacing: -0.01em;
30
+ }
31
+
32
+ .sh-ui-card__description {
33
+ font-size: var(--text-sm);
34
+ line-height: 1.5;
35
+ color: var(--foreground-muted);
36
+ }
37
+
38
+ .sh-ui-card__action {
39
+ grid-column: 2;
40
+ grid-row: 1 / span 2;
41
+ align-self: start;
42
+ justify-self: end;
43
+ }
44
+
45
+ .sh-ui-card__content {
46
+ padding: 0 var(--space-6);
47
+ font-size: var(--text-sm);
48
+ line-height: 1.6;
49
+ }
50
+
51
+ .sh-ui-card__footer {
52
+ padding: 0 var(--space-6);
53
+ display: flex;
54
+ align-items: center;
55
+ gap: var(--space-2);
56
+ }
57
+
58
+ /* 모바일: 패딩 축소 */
59
+ @media (max-width: 640px) {
60
+ .sh-ui-card {
61
+ gap: var(--space-4);
62
+ padding: var(--space-4) 0;
63
+ }
64
+ .sh-ui-card__header,
65
+ .sh-ui-card__content,
66
+ .sh-ui-card__footer {
67
+ padding-left: var(--space-4);
68
+ padding-right: var(--space-4);
69
+ }
70
+ .sh-ui-card__footer {
71
+ flex-wrap: wrap;
72
+ }
73
+ }