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,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { byKey, form, formSection, formField, formError } from "./styles.css";
|
|
4
|
+
import { Form as FormRoot, Section, SectionTitle } from "./form";
|
|
5
|
+
import {
|
|
6
|
+
Field,
|
|
7
|
+
FormLabel,
|
|
8
|
+
FormDescription,
|
|
9
|
+
FormError,
|
|
10
|
+
FormControl,
|
|
11
|
+
} from "./field";
|
|
12
|
+
import { Steps, Step } from "./steps";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* sh-ui Form의 compound 진입점. `Form.Field`, `Form.Label`, `Form.Description`,
|
|
16
|
+
* `Form.Error`, `Form.Control`, `Form.Section`, `Form.SectionTitle`, `Form.Steps`, `Form.Step` 으로
|
|
17
|
+
* 구조를 조립한다. 검증은 Standard Schema(yup/zod 등) 또는 inline 함수로 부착한다.
|
|
18
|
+
*/
|
|
19
|
+
type FormType = typeof FormRoot & {
|
|
20
|
+
Section: typeof Section;
|
|
21
|
+
SectionTitle: typeof SectionTitle;
|
|
22
|
+
Field: typeof Field;
|
|
23
|
+
Label: typeof FormLabel;
|
|
24
|
+
Description: typeof FormDescription;
|
|
25
|
+
Error: typeof FormError;
|
|
26
|
+
Control: typeof FormControl;
|
|
27
|
+
Steps: typeof Steps;
|
|
28
|
+
Step: typeof Step;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const Form = FormRoot as FormType;
|
|
32
|
+
Form.Section = Section;
|
|
33
|
+
Form.SectionTitle = SectionTitle;
|
|
34
|
+
Form.Field = Field;
|
|
35
|
+
Form.Label = FormLabel;
|
|
36
|
+
Form.Description = FormDescription;
|
|
37
|
+
Form.Error = FormError;
|
|
38
|
+
Form.Control = FormControl;
|
|
39
|
+
Form.Steps = Steps;
|
|
40
|
+
Form.Step = Step;
|
|
41
|
+
|
|
42
|
+
export { Form };
|
|
43
|
+
export { useShUiForm } from "./use-sh-ui-form";
|
|
44
|
+
export {
|
|
45
|
+
useFormContext,
|
|
46
|
+
useFormField,
|
|
47
|
+
useFormSection,
|
|
48
|
+
useFormState,
|
|
49
|
+
} from "./context";
|
|
50
|
+
export { useFormSteps } from "./steps";
|
|
51
|
+
export { createFormStore } from "./store";
|
|
52
|
+
export type {
|
|
53
|
+
FormStore,
|
|
54
|
+
FormStoreState,
|
|
55
|
+
FieldState,
|
|
56
|
+
FieldError,
|
|
57
|
+
FieldConfig,
|
|
58
|
+
FieldValidate,
|
|
59
|
+
ValidateOn,
|
|
60
|
+
StandardSchemaV1,
|
|
61
|
+
} from "./types";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { style, keyframes } from "@vanilla-extract/css";
|
|
2
|
+
|
|
3
|
+
export const shUiFormErrorIn = keyframes({
|
|
4
|
+
"from": {
|
|
5
|
+
opacity: 0,
|
|
6
|
+
transform: "translateY(-4px)",
|
|
7
|
+
},
|
|
8
|
+
"to": {
|
|
9
|
+
opacity: 1,
|
|
10
|
+
transform: "translateY(0)",
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const form = style({
|
|
15
|
+
display: "flex",
|
|
16
|
+
flexDirection: "column",
|
|
17
|
+
gap: "var(--space-4, 1rem)",
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const formSection = style({
|
|
21
|
+
display: "flex",
|
|
22
|
+
flexDirection: "column",
|
|
23
|
+
gap: "var(--space-4, 1rem)",
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export const formField = style({
|
|
27
|
+
display: "flex",
|
|
28
|
+
flexDirection: "column",
|
|
29
|
+
gap: "var(--space-1, 0.25rem)",
|
|
30
|
+
selectors: {
|
|
31
|
+
"&[data-disabled]": {
|
|
32
|
+
opacity: 0.6,
|
|
33
|
+
pointerEvents: "none",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export const formError = style({
|
|
39
|
+
color: "var(--color-danger, #dc2626)",
|
|
40
|
+
fontSize: "var(--text-sm, 0.875rem)",
|
|
41
|
+
margin: 0,
|
|
42
|
+
animation: "sh-ui-form-error-in 150ms\n var(--easing-out, cubic-bezier(0.16, 1, 0.3, 1))",
|
|
43
|
+
"@media": {
|
|
44
|
+
"(prefers-reduced-motion: reduce)": {
|
|
45
|
+
animationDuration: "0.01ms",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
/** 동적 키로 클래스 참조용 — `byKey[\`badge--${variant}\`]` 같은 패턴 지원. */
|
|
51
|
+
export const byKey: Record<string, string> = {
|
|
52
|
+
"form": form,
|
|
53
|
+
"form-section": formSection,
|
|
54
|
+
"form-field": formField,
|
|
55
|
+
"form-error": formError,
|
|
56
|
+
};
|