sh-ui-cli 0.48.0 → 0.50.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.
- package/data/changelog/versions.json +27 -0
- package/data/registry/react/components/accordion/index.vanilla-extract.tsx +97 -0
- package/data/registry/react/components/accordion/styles.css.ts +131 -0
- package/data/registry/react/components/avatar/index.vanilla-extract.tsx +73 -0
- package/data/registry/react/components/avatar/styles.css.ts +68 -0
- package/data/registry/react/components/badge/index.vanilla-extract.tsx +40 -0
- package/data/registry/react/components/badge/styles.css.ts +71 -0
- package/data/registry/react/components/breadcrumb/index.vanilla-extract.tsx +152 -0
- package/data/registry/react/components/breadcrumb/styles.css.ts +95 -0
- package/data/registry/react/components/button/index.vanilla-extract.tsx +45 -0
- package/data/registry/react/components/button/styles.css.ts +120 -0
- package/data/registry/react/components/calendar/index.vanilla-extract.tsx +806 -0
- package/data/registry/react/components/calendar/styles.css.ts +250 -0
- package/data/registry/react/components/card/index.vanilla-extract.tsx +63 -0
- package/data/registry/react/components/card/styles.css.ts +88 -0
- package/data/registry/react/components/carousel/index.vanilla-extract.tsx +430 -0
- package/data/registry/react/components/carousel/styles.css.ts +169 -0
- package/data/registry/react/components/checkbox/index.vanilla-extract.tsx +96 -0
- package/data/registry/react/components/checkbox/styles.css.ts +74 -0
- package/data/registry/react/components/code-editor/index.vanilla-extract.tsx +230 -0
- package/data/registry/react/components/code-editor/styles.css.ts +97 -0
- package/data/registry/react/components/code-panel/index.vanilla-extract.tsx +191 -0
- package/data/registry/react/components/code-panel/styles.css.ts +151 -0
- package/data/registry/react/components/color-picker/index.vanilla-extract.tsx +467 -0
- package/data/registry/react/components/color-picker/styles.css.ts +169 -0
- package/data/registry/react/components/combobox/index.vanilla-extract.tsx +165 -0
- package/data/registry/react/components/combobox/styles.css.ts +174 -0
- package/data/registry/react/components/context-menu/index.vanilla-extract.tsx +251 -0
- package/data/registry/react/components/context-menu/styles.css.ts +167 -0
- package/data/registry/react/components/date-picker/index.vanilla-extract.tsx +520 -0
- package/data/registry/react/components/date-picker/styles.css.ts +111 -0
- package/data/registry/react/components/dialog/index.vanilla-extract.tsx +95 -0
- package/data/registry/react/components/dialog/styles.css.ts +140 -0
- package/data/registry/react/components/dropdown-menu/index.vanilla-extract.tsx +255 -0
- package/data/registry/react/components/dropdown-menu/styles.css.ts +175 -0
- package/data/registry/react/components/file-upload/index.vanilla-extract.tsx +487 -0
- package/data/registry/react/components/file-upload/styles.css.ts +193 -0
- package/data/registry/react/components/form/index.vanilla-extract.tsx +61 -0
- package/data/registry/react/components/form/styles.css.ts +56 -0
- package/data/registry/react/components/header/index.vanilla-extract.tsx +805 -0
- package/data/registry/react/components/header/styles.css.ts +413 -0
- package/data/registry/react/components/input/index.vanilla-extract.tsx +425 -0
- package/data/registry/react/components/input/styles.css.ts +202 -0
- package/data/registry/react/components/label/index.vanilla-extract.tsx +52 -0
- package/data/registry/react/components/label/styles.css.ts +141 -0
- package/data/registry/react/components/markdown-editor/index.vanilla-extract.tsx +119 -0
- package/data/registry/react/components/markdown-editor/styles.css.ts +231 -0
- package/data/registry/react/components/menubar/index.vanilla-extract.tsx +32 -0
- package/data/registry/react/components/menubar/styles.css.ts +53 -0
- package/data/registry/react/components/numeric-input/index.vanilla-extract.tsx +148 -0
- package/data/registry/react/components/numeric-input/styles.css.ts +65 -0
- package/data/registry/react/components/page-toc/index.vanilla-extract.tsx +174 -0
- package/data/registry/react/components/page-toc/styles.css.ts +97 -0
- package/data/registry/react/components/pagination/index.vanilla-extract.tsx +269 -0
- package/data/registry/react/components/pagination/styles.css.ts +113 -0
- package/data/registry/react/components/popover/index.vanilla-extract.tsx +113 -0
- package/data/registry/react/components/popover/styles.css.ts +78 -0
- package/data/registry/react/components/progress/index.vanilla-extract.tsx +54 -0
- package/data/registry/react/components/progress/styles.css.ts +53 -0
- package/data/registry/react/components/radio/index.vanilla-extract.tsx +65 -0
- package/data/registry/react/components/radio/styles.css.ts +79 -0
- package/data/registry/react/components/rich-text-editor/index.vanilla-extract.tsx +348 -0
- package/data/registry/react/components/rich-text-editor/styles.css.ts +243 -0
- package/data/registry/react/components/select/index.vanilla-extract.tsx +234 -0
- package/data/registry/react/components/select/styles.css.ts +225 -0
- package/data/registry/react/components/separator/index.vanilla-extract.tsx +46 -0
- package/data/registry/react/components/separator/styles.css.ts +24 -0
- package/data/registry/react/components/sidebar/index.vanilla-extract.tsx +1067 -0
- package/data/registry/react/components/sidebar/styles.css.ts +578 -0
- package/data/registry/react/components/skeleton/index.vanilla-extract.tsx +22 -0
- package/data/registry/react/components/skeleton/styles.css.ts +30 -0
- package/data/registry/react/components/slider/index.vanilla-extract.tsx +298 -0
- package/data/registry/react/components/slider/styles.css.ts +75 -0
- package/data/registry/react/components/spinner/index.vanilla-extract.tsx +38 -0
- package/data/registry/react/components/spinner/styles.css.ts +60 -0
- package/data/registry/react/components/switch/index.vanilla-extract.tsx +39 -0
- package/data/registry/react/components/switch/styles.css.ts +87 -0
- package/data/registry/react/components/tabs/index.vanilla-extract.tsx +91 -0
- package/data/registry/react/components/tabs/styles.css.ts +145 -0
- package/data/registry/react/components/textarea/index.vanilla-extract.tsx +23 -0
- package/data/registry/react/components/textarea/styles.css.ts +55 -0
- package/data/registry/react/components/toast/index.vanilla-extract.tsx +258 -0
- package/data/registry/react/components/toast/styles.css.ts +307 -0
- package/data/registry/react/components/toggle/index.vanilla-extract.tsx +131 -0
- package/data/registry/react/components/toggle/styles.css.ts +109 -0
- package/data/registry/react/components/tooltip/index.vanilla-extract.tsx +83 -0
- package/data/registry/react/components/tooltip/styles.css.ts +59 -0
- package/data/registry/react/peer-versions.json +1 -0
- package/data/registry/react/registry.json +922 -42
- package/data/tokens/build.mjs +3 -0
- package/package.json +1 -1
- package/src/api.d.ts +4 -3
- package/src/constants.js +4 -3
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { style } from "@vanilla-extract/css";
|
|
2
|
+
|
|
3
|
+
export const breadcrumb = style({
|
|
4
|
+
fontSize: "var(--text-sm)",
|
|
5
|
+
color: "var(--foreground-muted)",
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export const breadcrumb__list = style({
|
|
9
|
+
display: "flex",
|
|
10
|
+
alignItems: "center",
|
|
11
|
+
flexWrap: "wrap",
|
|
12
|
+
gap: "0.375rem",
|
|
13
|
+
margin: 0,
|
|
14
|
+
padding: 0,
|
|
15
|
+
listStyle: "none",
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const breadcrumb__item = style({
|
|
19
|
+
display: "inline-flex",
|
|
20
|
+
alignItems: "center",
|
|
21
|
+
gap: "0.375rem",
|
|
22
|
+
minWidth: 0,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export const breadcrumb__link = style({
|
|
26
|
+
color: "var(--foreground-muted)",
|
|
27
|
+
textDecoration: "none",
|
|
28
|
+
borderRadius: "calc(var(--radius) - 2px)",
|
|
29
|
+
padding: "0 0.125rem",
|
|
30
|
+
transition: "color var(--duration-fast)",
|
|
31
|
+
selectors: {
|
|
32
|
+
"&:hover": {
|
|
33
|
+
color: "var(--foreground)",
|
|
34
|
+
textDecoration: "underline",
|
|
35
|
+
textUnderlineOffset: "3px",
|
|
36
|
+
},
|
|
37
|
+
"&:focus-visible": {
|
|
38
|
+
outline: "var(--border-width-strong) solid var(--foreground)",
|
|
39
|
+
outlineOffset: "2px",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
"@media": {
|
|
43
|
+
"(prefers-reduced-motion: reduce)": {
|
|
44
|
+
transition: "none",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export const breadcrumb__page = style({
|
|
50
|
+
color: "var(--foreground)",
|
|
51
|
+
fontWeight: "var(--weight-medium)",
|
|
52
|
+
overflow: "hidden",
|
|
53
|
+
textOverflow: "ellipsis",
|
|
54
|
+
whiteSpace: "nowrap",
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export const breadcrumb__separator = style({
|
|
58
|
+
display: "inline-flex",
|
|
59
|
+
alignItems: "center",
|
|
60
|
+
color: "var(--foreground-muted)",
|
|
61
|
+
opacity: 0.6,
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export const breadcrumb__ellipsis = style({
|
|
65
|
+
display: "inline-flex",
|
|
66
|
+
alignItems: "center",
|
|
67
|
+
width: "1.5rem",
|
|
68
|
+
height: "1.5rem",
|
|
69
|
+
justifyContent: "center",
|
|
70
|
+
color: "var(--foreground-muted)",
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export const breadcrumbEllipsisSr = style({
|
|
74
|
+
position: "absolute",
|
|
75
|
+
width: "1px",
|
|
76
|
+
height: "1px",
|
|
77
|
+
padding: 0,
|
|
78
|
+
margin: "-1px",
|
|
79
|
+
overflow: "hidden",
|
|
80
|
+
clip: "rect(0, 0, 0, 0)",
|
|
81
|
+
whiteSpace: "nowrap",
|
|
82
|
+
border: 0,
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
/** 동적 키로 클래스 참조용 — `byKey[\`badge--${variant}\`]` 같은 패턴 지원. */
|
|
86
|
+
export const byKey: Record<string, string> = {
|
|
87
|
+
"breadcrumb": breadcrumb,
|
|
88
|
+
"breadcrumb__list": breadcrumb__list,
|
|
89
|
+
"breadcrumb__item": breadcrumb__item,
|
|
90
|
+
"breadcrumb__link": breadcrumb__link,
|
|
91
|
+
"breadcrumb__page": breadcrumb__page,
|
|
92
|
+
"breadcrumb__separator": breadcrumb__separator,
|
|
93
|
+
"breadcrumb__ellipsis": breadcrumb__ellipsis,
|
|
94
|
+
"breadcrumb__ellipsis-sr": breadcrumbEllipsisSr,
|
|
95
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cn } from "@SH_UI_UTILS@";
|
|
3
|
+
import { button, sizes, variants } from "./styles.css";
|
|
4
|
+
|
|
5
|
+
type Variant = "primary" | "secondary" | "ghost" | "danger" | "link";
|
|
6
|
+
type Size = "sm" | "md" | "lg";
|
|
7
|
+
|
|
8
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
9
|
+
/**
|
|
10
|
+
* 시각적 위계.
|
|
11
|
+
* - `primary` — 페이지의 주요 액션. 한 화면에 하나만 권장.
|
|
12
|
+
* - `secondary` — 보조 액션. 약한 배경 + border.
|
|
13
|
+
* - `ghost` — 배경 없는 hover 강조 액션. 툴바/메뉴 항목에 적합.
|
|
14
|
+
* - `danger` — 파괴적 액션(삭제, 취소 등).
|
|
15
|
+
* - `link` — 텍스트 링크처럼 보이는 인라인 버튼.
|
|
16
|
+
*
|
|
17
|
+
* @default "primary"
|
|
18
|
+
*/
|
|
19
|
+
variant?: Variant;
|
|
20
|
+
/**
|
|
21
|
+
* 크기.
|
|
22
|
+
* - `sm` — 조밀한 영역(테이블 행, 툴바)
|
|
23
|
+
* - `md` — 일반
|
|
24
|
+
* - `lg` — CTA·랜딩 영역
|
|
25
|
+
*
|
|
26
|
+
* @default "md"
|
|
27
|
+
*/
|
|
28
|
+
size?: Size;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 사용자 액션을 트리거하는 기본 버튼 (vanilla-extract 변종).
|
|
33
|
+
* variant로 시각적 위계(primary/secondary/ghost/danger/link)를,
|
|
34
|
+
* size로 크기를 결정한다. 페이지 이동 목적이면 anchor를 감싼 `link` variant를 사용할 것.
|
|
35
|
+
*/
|
|
36
|
+
export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
37
|
+
({ variant = "primary", size = "md", className, ...props }, ref) => (
|
|
38
|
+
<button
|
|
39
|
+
ref={ref}
|
|
40
|
+
className={cn(button, sizes[size], variants[variant], className)}
|
|
41
|
+
{...props}
|
|
42
|
+
/>
|
|
43
|
+
),
|
|
44
|
+
);
|
|
45
|
+
Button.displayName = "Button";
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { style, styleVariants } from "@vanilla-extract/css";
|
|
2
|
+
|
|
3
|
+
export const button = style({
|
|
4
|
+
display: "inline-flex",
|
|
5
|
+
alignItems: "center",
|
|
6
|
+
justifyContent: "center",
|
|
7
|
+
gap: "var(--space-2)",
|
|
8
|
+
border: "1px solid transparent",
|
|
9
|
+
borderRadius: "var(--radius)",
|
|
10
|
+
fontWeight: "var(--weight-medium)",
|
|
11
|
+
lineHeight: 1,
|
|
12
|
+
cursor: "pointer",
|
|
13
|
+
transition:
|
|
14
|
+
"background-color var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast), transform 80ms ease-out, filter 80ms",
|
|
15
|
+
userSelect: "none",
|
|
16
|
+
WebkitTapHighlightColor: "transparent",
|
|
17
|
+
|
|
18
|
+
selectors: {
|
|
19
|
+
"&:disabled": {
|
|
20
|
+
opacity: "var(--opacity-disabled)",
|
|
21
|
+
pointerEvents: "none",
|
|
22
|
+
},
|
|
23
|
+
"&:focus-visible": {
|
|
24
|
+
outline: "var(--border-width-strong) solid var(--foreground)",
|
|
25
|
+
outlineOffset: "2px",
|
|
26
|
+
},
|
|
27
|
+
"&:active:not(:disabled)": {
|
|
28
|
+
transform: "scale(0.97)",
|
|
29
|
+
filter: "brightness(0.92)",
|
|
30
|
+
transitionDuration: "40ms",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
"@media": {
|
|
35
|
+
"(prefers-reduced-motion: reduce)": {
|
|
36
|
+
transition: "none",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export const sizes = styleVariants({
|
|
42
|
+
sm: {
|
|
43
|
+
height: "var(--control-sm)",
|
|
44
|
+
padding: "0 var(--space-3)",
|
|
45
|
+
fontSize: "var(--text-sm)",
|
|
46
|
+
"@media": {
|
|
47
|
+
"(hover: none) and (pointer: coarse)": {
|
|
48
|
+
height: "2.25rem",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
md: {
|
|
53
|
+
height: "var(--control-md)",
|
|
54
|
+
padding: "0 var(--space-4)",
|
|
55
|
+
fontSize: "var(--text-sm)",
|
|
56
|
+
"@media": {
|
|
57
|
+
"(hover: none) and (pointer: coarse)": {
|
|
58
|
+
height: "2.75rem",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
lg: {
|
|
63
|
+
height: "var(--control-lg)",
|
|
64
|
+
padding: "0 var(--space-5)",
|
|
65
|
+
fontSize: "var(--text-base)",
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export const variants = styleVariants({
|
|
70
|
+
primary: {
|
|
71
|
+
backgroundColor: "var(--primary)",
|
|
72
|
+
color: "var(--primary-foreground)",
|
|
73
|
+
selectors: {
|
|
74
|
+
"&:hover": {
|
|
75
|
+
backgroundColor: "var(--primary-hover)",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
secondary: {
|
|
80
|
+
backgroundColor: "var(--background-muted)",
|
|
81
|
+
color: "var(--foreground)",
|
|
82
|
+
borderColor: "var(--border)",
|
|
83
|
+
selectors: {
|
|
84
|
+
"&:hover": {
|
|
85
|
+
backgroundColor: "var(--background-subtle)",
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
ghost: {
|
|
90
|
+
backgroundColor: "transparent",
|
|
91
|
+
color: "var(--foreground)",
|
|
92
|
+
selectors: {
|
|
93
|
+
"&:hover": {
|
|
94
|
+
backgroundColor: "var(--background-muted)",
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
danger: {
|
|
99
|
+
backgroundColor: "var(--danger)",
|
|
100
|
+
color: "var(--danger-foreground)",
|
|
101
|
+
},
|
|
102
|
+
link: {
|
|
103
|
+
backgroundColor: "transparent",
|
|
104
|
+
color: "var(--foreground)",
|
|
105
|
+
borderColor: "transparent",
|
|
106
|
+
height: "auto",
|
|
107
|
+
padding: 0,
|
|
108
|
+
textUnderlineOffset: "3px",
|
|
109
|
+
selectors: {
|
|
110
|
+
"&:hover": {
|
|
111
|
+
textDecoration: "underline",
|
|
112
|
+
},
|
|
113
|
+
"&:active:not(:disabled)": {
|
|
114
|
+
transform: "none",
|
|
115
|
+
filter: "none",
|
|
116
|
+
color: "var(--foreground-muted)",
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
});
|