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.
Files changed (93) hide show
  1. package/data/changelog/versions.json +27 -0
  2. package/data/registry/react/components/accordion/index.vanilla-extract.tsx +97 -0
  3. package/data/registry/react/components/accordion/styles.css.ts +131 -0
  4. package/data/registry/react/components/avatar/index.vanilla-extract.tsx +73 -0
  5. package/data/registry/react/components/avatar/styles.css.ts +68 -0
  6. package/data/registry/react/components/badge/index.vanilla-extract.tsx +40 -0
  7. package/data/registry/react/components/badge/styles.css.ts +71 -0
  8. package/data/registry/react/components/breadcrumb/index.vanilla-extract.tsx +152 -0
  9. package/data/registry/react/components/breadcrumb/styles.css.ts +95 -0
  10. package/data/registry/react/components/button/index.vanilla-extract.tsx +45 -0
  11. package/data/registry/react/components/button/styles.css.ts +120 -0
  12. package/data/registry/react/components/calendar/index.vanilla-extract.tsx +806 -0
  13. package/data/registry/react/components/calendar/styles.css.ts +250 -0
  14. package/data/registry/react/components/card/index.vanilla-extract.tsx +63 -0
  15. package/data/registry/react/components/card/styles.css.ts +88 -0
  16. package/data/registry/react/components/carousel/index.vanilla-extract.tsx +430 -0
  17. package/data/registry/react/components/carousel/styles.css.ts +169 -0
  18. package/data/registry/react/components/checkbox/index.vanilla-extract.tsx +96 -0
  19. package/data/registry/react/components/checkbox/styles.css.ts +74 -0
  20. package/data/registry/react/components/code-editor/index.vanilla-extract.tsx +230 -0
  21. package/data/registry/react/components/code-editor/styles.css.ts +97 -0
  22. package/data/registry/react/components/code-panel/index.vanilla-extract.tsx +191 -0
  23. package/data/registry/react/components/code-panel/styles.css.ts +151 -0
  24. package/data/registry/react/components/color-picker/index.vanilla-extract.tsx +467 -0
  25. package/data/registry/react/components/color-picker/styles.css.ts +169 -0
  26. package/data/registry/react/components/combobox/index.vanilla-extract.tsx +165 -0
  27. package/data/registry/react/components/combobox/styles.css.ts +174 -0
  28. package/data/registry/react/components/context-menu/index.vanilla-extract.tsx +251 -0
  29. package/data/registry/react/components/context-menu/styles.css.ts +167 -0
  30. package/data/registry/react/components/date-picker/index.vanilla-extract.tsx +520 -0
  31. package/data/registry/react/components/date-picker/styles.css.ts +111 -0
  32. package/data/registry/react/components/dialog/index.vanilla-extract.tsx +95 -0
  33. package/data/registry/react/components/dialog/styles.css.ts +140 -0
  34. package/data/registry/react/components/dropdown-menu/index.vanilla-extract.tsx +255 -0
  35. package/data/registry/react/components/dropdown-menu/styles.css.ts +175 -0
  36. package/data/registry/react/components/file-upload/index.vanilla-extract.tsx +487 -0
  37. package/data/registry/react/components/file-upload/styles.css.ts +193 -0
  38. package/data/registry/react/components/form/index.vanilla-extract.tsx +61 -0
  39. package/data/registry/react/components/form/styles.css.ts +56 -0
  40. package/data/registry/react/components/header/index.vanilla-extract.tsx +805 -0
  41. package/data/registry/react/components/header/styles.css.ts +413 -0
  42. package/data/registry/react/components/input/index.vanilla-extract.tsx +425 -0
  43. package/data/registry/react/components/input/styles.css.ts +202 -0
  44. package/data/registry/react/components/label/index.vanilla-extract.tsx +52 -0
  45. package/data/registry/react/components/label/styles.css.ts +141 -0
  46. package/data/registry/react/components/markdown-editor/index.vanilla-extract.tsx +119 -0
  47. package/data/registry/react/components/markdown-editor/styles.css.ts +231 -0
  48. package/data/registry/react/components/menubar/index.vanilla-extract.tsx +32 -0
  49. package/data/registry/react/components/menubar/styles.css.ts +53 -0
  50. package/data/registry/react/components/numeric-input/index.vanilla-extract.tsx +148 -0
  51. package/data/registry/react/components/numeric-input/styles.css.ts +65 -0
  52. package/data/registry/react/components/page-toc/index.vanilla-extract.tsx +174 -0
  53. package/data/registry/react/components/page-toc/styles.css.ts +97 -0
  54. package/data/registry/react/components/pagination/index.vanilla-extract.tsx +269 -0
  55. package/data/registry/react/components/pagination/styles.css.ts +113 -0
  56. package/data/registry/react/components/popover/index.vanilla-extract.tsx +113 -0
  57. package/data/registry/react/components/popover/styles.css.ts +78 -0
  58. package/data/registry/react/components/progress/index.vanilla-extract.tsx +54 -0
  59. package/data/registry/react/components/progress/styles.css.ts +53 -0
  60. package/data/registry/react/components/radio/index.vanilla-extract.tsx +65 -0
  61. package/data/registry/react/components/radio/styles.css.ts +79 -0
  62. package/data/registry/react/components/rich-text-editor/index.vanilla-extract.tsx +348 -0
  63. package/data/registry/react/components/rich-text-editor/styles.css.ts +243 -0
  64. package/data/registry/react/components/select/index.vanilla-extract.tsx +234 -0
  65. package/data/registry/react/components/select/styles.css.ts +225 -0
  66. package/data/registry/react/components/separator/index.vanilla-extract.tsx +46 -0
  67. package/data/registry/react/components/separator/styles.css.ts +24 -0
  68. package/data/registry/react/components/sidebar/index.vanilla-extract.tsx +1067 -0
  69. package/data/registry/react/components/sidebar/styles.css.ts +578 -0
  70. package/data/registry/react/components/skeleton/index.vanilla-extract.tsx +22 -0
  71. package/data/registry/react/components/skeleton/styles.css.ts +30 -0
  72. package/data/registry/react/components/slider/index.vanilla-extract.tsx +298 -0
  73. package/data/registry/react/components/slider/styles.css.ts +75 -0
  74. package/data/registry/react/components/spinner/index.vanilla-extract.tsx +38 -0
  75. package/data/registry/react/components/spinner/styles.css.ts +60 -0
  76. package/data/registry/react/components/switch/index.vanilla-extract.tsx +39 -0
  77. package/data/registry/react/components/switch/styles.css.ts +87 -0
  78. package/data/registry/react/components/tabs/index.vanilla-extract.tsx +91 -0
  79. package/data/registry/react/components/tabs/styles.css.ts +145 -0
  80. package/data/registry/react/components/textarea/index.vanilla-extract.tsx +23 -0
  81. package/data/registry/react/components/textarea/styles.css.ts +55 -0
  82. package/data/registry/react/components/toast/index.vanilla-extract.tsx +258 -0
  83. package/data/registry/react/components/toast/styles.css.ts +307 -0
  84. package/data/registry/react/components/toggle/index.vanilla-extract.tsx +131 -0
  85. package/data/registry/react/components/toggle/styles.css.ts +109 -0
  86. package/data/registry/react/components/tooltip/index.vanilla-extract.tsx +83 -0
  87. package/data/registry/react/components/tooltip/styles.css.ts +59 -0
  88. package/data/registry/react/peer-versions.json +1 -0
  89. package/data/registry/react/registry.json +922 -42
  90. package/data/tokens/build.mjs +3 -0
  91. package/package.json +1 -1
  92. package/src/api.d.ts +4 -3
  93. 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
+ };