@reitwagen/design-components 0.4.0 → 0.6.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 (62) hide show
  1. package/dist/components/Button/Button.stories.d.ts +1 -0
  2. package/dist/components/Button/Button.stories.d.ts.map +1 -1
  3. package/dist/components/Button/Button.stories.js +4 -0
  4. package/dist/components/Checkbox/Checkbox.stories.d.ts +1 -0
  5. package/dist/components/Checkbox/Checkbox.stories.d.ts.map +1 -1
  6. package/dist/components/Checkbox/Checkbox.stories.js +4 -0
  7. package/dist/components/Chip/Chip.stories.d.ts +1 -0
  8. package/dist/components/Chip/Chip.stories.d.ts.map +1 -1
  9. package/dist/components/Chip/Chip.stories.js +2 -0
  10. package/dist/components/Chip/index.d.ts.map +1 -1
  11. package/dist/components/FormControl/FormControl.d.ts +55 -0
  12. package/dist/components/FormControl/FormControl.d.ts.map +1 -0
  13. package/dist/components/FormControl/FormControl.js +79 -0
  14. package/dist/components/FormControl/FormControl.stories.d.ts +19 -0
  15. package/dist/components/FormControl/FormControl.stories.d.ts.map +1 -0
  16. package/dist/components/FormControl/FormControl.stories.js +75 -0
  17. package/dist/components/FormControl/FormControlLabel.d.ts +20 -0
  18. package/dist/components/FormControl/FormControlLabel.d.ts.map +1 -0
  19. package/dist/components/FormControl/FormControlLabel.js +32 -0
  20. package/dist/components/FormControl/FormControlValidation.d.ts +13 -0
  21. package/dist/components/FormControl/FormControlValidation.d.ts.map +1 -0
  22. package/dist/components/FormControl/FormControlValidation.js +22 -0
  23. package/dist/components/FormControl/index.d.ts +2 -0
  24. package/dist/components/FormControl/index.d.ts.map +1 -0
  25. package/dist/components/FormControl/index.js +5 -0
  26. package/dist/components/Icons/IconPlaceLine.js +1 -1
  27. package/dist/components/Input/Input.d.ts +28 -0
  28. package/dist/components/Input/Input.d.ts.map +1 -0
  29. package/dist/components/Input/Input.js +30 -0
  30. package/dist/components/Input/Input.stories.d.ts +34 -0
  31. package/dist/components/Input/Input.stories.d.ts.map +1 -0
  32. package/dist/components/Input/Input.stories.js +81 -0
  33. package/dist/components/Input/Input.styles.d.ts +5 -0
  34. package/dist/components/Input/Input.styles.d.ts.map +1 -0
  35. package/dist/components/Input/Input.styles.js +20 -0
  36. package/dist/components/Input/index.d.ts +2 -0
  37. package/dist/components/Input/index.d.ts.map +1 -0
  38. package/dist/components/Input/index.js +5 -0
  39. package/dist/components/Radio/Radio.d.ts +6 -6
  40. package/dist/components/Radio/Radio.d.ts.map +1 -1
  41. package/dist/components/Radio/Radio.js +27 -9
  42. package/dist/components/Radio/Radio.stories.d.ts +1 -0
  43. package/dist/components/Radio/Radio.stories.d.ts.map +1 -1
  44. package/dist/components/Radio/Radio.stories.js +6 -2
  45. package/dist/components/Radio/index.d.ts.map +1 -1
  46. package/dist/components/RadioGroup/RadioGroup.d.ts +55 -0
  47. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -0
  48. package/dist/components/RadioGroup/RadioGroup.js +45 -0
  49. package/dist/components/RadioGroup/RadioGroup.stories.d.ts +40 -0
  50. package/dist/components/RadioGroup/RadioGroup.stories.d.ts.map +1 -0
  51. package/dist/components/RadioGroup/RadioGroup.stories.js +103 -0
  52. package/dist/components/RadioGroup/index.d.ts +2 -0
  53. package/dist/components/RadioGroup/index.d.ts.map +1 -0
  54. package/dist/components/RadioGroup/index.js +5 -0
  55. package/dist/components/Toggle/index.d.ts.map +1 -1
  56. package/dist/index.css +70 -0
  57. package/dist/index.d.ts +3 -0
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +3 -0
  60. package/dist/types/props.d.ts +2 -2
  61. package/dist/types/props.d.ts.map +1 -1
  62. package/package.json +3 -3
@@ -5,6 +5,7 @@ declare const meta: {
5
5
  component: typeof Button;
6
6
  tags: string[];
7
7
  parameters: {
8
+ layout: string;
8
9
  docs: {
9
10
  description: {
10
11
  component: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,KA6BtB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAgCpB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KA+BnB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAcnB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAoBtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAoBlB,CAAC"}
1
+ {"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,KA8BtB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAiCpB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAgCnB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAcnB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAoBtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAoBlB,CAAC"}
@@ -8,6 +8,7 @@ const meta = {
8
8
  component: Button_1.Button,
9
9
  tags: ["autodocs"],
10
10
  parameters: {
11
+ layout: "centered",
11
12
  docs: {
12
13
  description: {
13
14
  component: `
@@ -56,6 +57,7 @@ const meta = {
56
57
  exports.default = meta;
57
58
  exports.Variants = {
58
59
  parameters: {
60
+ layout: "centered",
59
61
  docs: {
60
62
  description: {
61
63
  story: `
@@ -74,6 +76,7 @@ exports.Variants = {
74
76
  };
75
77
  exports.Colors = {
76
78
  parameters: {
79
+ layout: "centered",
77
80
  docs: {
78
81
  description: {
79
82
  story: `
@@ -92,6 +95,7 @@ exports.Colors = {
92
95
  };
93
96
  exports.Sizes = {
94
97
  parameters: {
98
+ layout: "centered",
95
99
  docs: {
96
100
  description: {
97
101
  story: `
@@ -5,6 +5,7 @@ declare const meta: {
5
5
  component: typeof Checkbox;
6
6
  tags: string[];
7
7
  parameters: {
8
+ layout: string;
8
9
  docs: {
9
10
  description: {
10
11
  component: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAGrD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;CAuBuB,CAAC;AAElC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAgBnC,eAAO,MAAM,UAAU,EAAE,KA8CxB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KA0CjC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KA2B1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAqBnC,CAAC"}
1
+ {"version":3,"file":"Checkbox.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAGrD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBuB,CAAC;AAElC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAgBnC,eAAO,MAAM,UAAU,EAAE,KA+CxB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KA2CjC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KA4B1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAqBnC,CAAC"}
@@ -10,6 +10,7 @@ const meta = {
10
10
  component: Checkbox_1.Checkbox,
11
11
  tags: ["autodocs"],
12
12
  parameters: {
13
+ layout: "centered",
13
14
  docs: {
14
15
  description: {
15
16
  component: `
@@ -36,6 +37,7 @@ function CheckboxWithControlled(props) {
36
37
  }
37
38
  exports.Controlled = {
38
39
  parameters: {
40
+ layout: "centered",
39
41
  docs: {
40
42
  description: {
41
43
  story: `
@@ -83,6 +85,7 @@ function Controlled() {
83
85
  };
84
86
  exports.ControlledWithLabel = {
85
87
  parameters: {
88
+ layout: "centered",
86
89
  docs: {
87
90
  source: {
88
91
  code: `
@@ -126,6 +129,7 @@ function Controlled() {
126
129
  };
127
130
  exports.UnControlled = {
128
131
  parameters: {
132
+ layout: "centered",
129
133
  docs: {
130
134
  description: {
131
135
  story: `
@@ -5,6 +5,7 @@ declare const meta: {
5
5
  component: typeof Chip;
6
6
  tags: string[];
7
7
  parameters: {
8
+ layout: string;
8
9
  docs: {
9
10
  description: {
10
11
  component: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Chip.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/Chip.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCmB,CAAC;AAE9B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,KAqCtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAmBlB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAkBlB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAmBlB,CAAC"}
1
+ {"version":3,"file":"Chip.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/Chip.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCmB,CAAC;AAE9B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,KAsCtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAmBlB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAkBlB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAmBlB,CAAC"}
@@ -8,6 +8,7 @@ const meta = {
8
8
  component: Chip_1.Chip,
9
9
  tags: ["autodocs"],
10
10
  parameters: {
11
+ layout: "centered",
11
12
  docs: {
12
13
  description: {
13
14
  component: `
@@ -46,6 +47,7 @@ const meta = {
46
47
  exports.default = meta;
47
48
  exports.Variants = {
48
49
  parameters: {
50
+ layout: "centered",
49
51
  docs: {
50
52
  description: {
51
53
  story: `
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,55 @@
1
+ import { ComponentPropsWithRef } from "react";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import { ChildrenProps } from "../../types/props";
4
+ import { FormControlLabel } from "./FormControlLabel";
5
+ import { FormControlValidation } from "./FormControlValidation";
6
+ type FormControlContextValue = {
7
+ id: string;
8
+ disabled?: boolean;
9
+ required?: boolean;
10
+ error?: boolean;
11
+ labelId: string;
12
+ validationId?: string;
13
+ };
14
+ export declare const useFormControl: () => FormControlContextValue;
15
+ declare const formControlVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
16
+ export type FormControlBaseProps = ComponentPropsWithRef<"div"> & ChildrenProps & VariantProps<typeof formControlVariants> & {
17
+ /**
18
+ * 입력 필드의 고유 ID
19
+ */
20
+ id?: string;
21
+ /**
22
+ * 필수 입력 여부
23
+ */
24
+ required?: boolean;
25
+ /**
26
+ * 비활성화 여부
27
+ */
28
+ disabled?: boolean;
29
+ /**
30
+ * 에러 상태 여부
31
+ */
32
+ error?: boolean;
33
+ };
34
+ /**
35
+ * `FormControl`: Input 컴포넌트에 Label, Validation 등을 제공하는 래퍼 컴포넌트입니다.
36
+ * @see [RDS Storybook: FormControl](https://main--691ac7d6da1eb0c0acb5f3e2.chromatic.com/?path=/docs/components-formcontrol--docs)
37
+ * @example
38
+ * ```tsx
39
+ * <FormControl required error>
40
+ * <FormControl.Label>이메일</FormControl.Label>
41
+ * <Input type="email" placeholder="example@baree.net" />
42
+ * <FormControl.Validation>올바른 이메일 형식이 아닙니다</FormControl.Validation>
43
+ * </FormControl>
44
+ * ```
45
+ */
46
+ declare function FormControlBase({ id: idProp, required, disabled, error, className, children, ...props }: FormControlBaseProps): import("react/jsx-runtime").JSX.Element;
47
+ declare namespace FormControlBase {
48
+ var displayName: string;
49
+ }
50
+ export declare const FormControl: typeof FormControlBase & {
51
+ Label: typeof FormControlLabel;
52
+ Validation: typeof FormControlValidation;
53
+ };
54
+ export {};
55
+ //# sourceMappingURL=FormControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormControl.d.ts","sourceRoot":"","sources":["../../../src/components/FormControl/FormControl.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,qBAAqB,EAQtB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,KAAK,uBAAuB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAIF,eAAO,MAAM,cAAc,+BAS1B,CAAC;AAEF,QAAA,MAAM,mBAAmB,oFAAwC,CAAC;AAElE,MAAM,MAAM,oBAAoB,GAAG,qBAAqB,CAAC,KAAK,CAAC,GAC7D,aAAa,GACb,YAAY,CAAC,OAAO,mBAAmB,CAAC,GAAG;IACzC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEJ;;;;;;;;;;;GAWG;AACH,iBAAS,eAAe,CAAC,EACvB,EAAE,EAAE,MAAM,EACV,QAAgB,EAChB,QAAgB,EAChB,KAAa,EACb,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,2CAyDtB;kBAjEQ,eAAe;;;AAqExB,eAAO,MAAM,WAAW;;;CAGtB,CAAC"}
@@ -0,0 +1,79 @@
1
+ "use client";
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.FormControl = exports.useFormControl = void 0;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const react_1 = require("react");
7
+ const class_variance_authority_1 = require("class-variance-authority");
8
+ const style_1 = require("../../utils/style");
9
+ const Input_1 = require("../Input");
10
+ const FormControlLabel_1 = require("./FormControlLabel");
11
+ const FormControlValidation_1 = require("./FormControlValidation");
12
+ const FormControlContext = (0, react_1.createContext)(null);
13
+ const useFormControl = () => {
14
+ const context = (0, react_1.use)(FormControlContext);
15
+ if (!context) {
16
+ throw new Error("FormControl compound components must be used within FormControl");
17
+ }
18
+ return context;
19
+ };
20
+ exports.useFormControl = useFormControl;
21
+ const formControlVariants = (0, class_variance_authority_1.cva)("ui:flex ui:flex-col ui:gap-1.5");
22
+ /**
23
+ * `FormControl`: Input 컴포넌트에 Label, Validation 등을 제공하는 래퍼 컴포넌트입니다.
24
+ * @see [RDS Storybook: FormControl](https://main--691ac7d6da1eb0c0acb5f3e2.chromatic.com/?path=/docs/components-formcontrol--docs)
25
+ * @example
26
+ * ```tsx
27
+ * <FormControl required error>
28
+ * <FormControl.Label>이메일</FormControl.Label>
29
+ * <Input type="email" placeholder="example@baree.net" />
30
+ * <FormControl.Validation>올바른 이메일 형식이 아닙니다</FormControl.Validation>
31
+ * </FormControl>
32
+ * ```
33
+ */
34
+ function FormControlBase({ id: idProp, required = false, disabled = false, error = false, className, children, ...props }) {
35
+ const uniqId = (0, react_1.useId)();
36
+ const id = idProp || uniqId;
37
+ const labelId = `${id}-label`;
38
+ const validationId = `${id}-validation`;
39
+ let labelSlot = null;
40
+ let inputSlot = null;
41
+ let validationSlot = null;
42
+ const childArray = Array.isArray(children) ? children : [children];
43
+ childArray.forEach((child) => {
44
+ if (!(0, react_1.isValidElement)(child)) {
45
+ return;
46
+ }
47
+ switch (child.type) {
48
+ case FormControlLabel_1.FormControlLabel:
49
+ labelSlot = child;
50
+ break;
51
+ case Input_1.Input: {
52
+ const inputChild = child;
53
+ inputSlot = (0, react_1.cloneElement)(inputChild, {
54
+ id,
55
+ disabled: disabled || inputChild.props.disabled,
56
+ required: required || inputChild.props.required,
57
+ variant: error ? "error" : inputChild.props.variant,
58
+ });
59
+ break;
60
+ }
61
+ case FormControlValidation_1.FormControlValidation:
62
+ validationSlot = child;
63
+ break;
64
+ }
65
+ });
66
+ return ((0, jsx_runtime_1.jsx)(FormControlContext, { value: {
67
+ id,
68
+ disabled,
69
+ required,
70
+ error,
71
+ labelId,
72
+ validationId,
73
+ }, children: (0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.cn)(formControlVariants({ className })), ...props, children: [labelSlot, (0, jsx_runtime_1.jsxs)("div", { className: "ui:flex ui:flex-col ui:gap-1", children: [inputSlot, validationSlot] })] }) }));
74
+ }
75
+ FormControlBase.displayName = "FormControlBase";
76
+ exports.FormControl = Object.assign(FormControlBase, {
77
+ Label: FormControlLabel_1.FormControlLabel,
78
+ Validation: FormControlValidation_1.FormControlValidation,
79
+ });
@@ -0,0 +1,19 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { FormControlBaseProps } from "./FormControl";
3
+ declare const meta: Meta<FormControlBaseProps>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Required: Story;
8
+ export declare const Disabled: Story;
9
+ export declare const WithError: Story;
10
+ /**
11
+ * 필수 입력이면서 에러 상태인 필드입니다.
12
+ */
13
+ export declare const RequiredWithError: Story;
14
+ /**
15
+ * 시각적으로 숨겨진 라벨입니다. 접근성은 유지됩니다.
16
+ */
17
+ export declare const VisuallyHiddenLabel: Story;
18
+ export declare const MultipleInputTypes: Story;
19
+ //# sourceMappingURL=FormControl.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormControl.stories.d.ts","sourceRoot":"","sources":["../../../src/components/FormControl/FormControl.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAe,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAGlE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,oBAAoB,CAwCC,CAAC;AAEvC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAStB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAStB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAYvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAY/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KASjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAwBhC,CAAC"}
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MultipleInputTypes = exports.VisuallyHiddenLabel = exports.RequiredWithError = exports.WithError = exports.Disabled = exports.Required = exports.Default = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const FormControl_1 = require("./FormControl");
6
+ const Input_1 = require("../Input");
7
+ const meta = {
8
+ title: "Components/FormControl",
9
+ component: FormControl_1.FormControl,
10
+ parameters: {
11
+ layout: "centered",
12
+ docs: {
13
+ description: {
14
+ component: `
15
+ Input 컴포넌트에 Label, Validation 등을 제공하는 래퍼 컴포넌트입니다.
16
+ `,
17
+ },
18
+ },
19
+ },
20
+ tags: ["autodocs"],
21
+ argTypes: {
22
+ required: {
23
+ control: "boolean",
24
+ options: ["true", "false"],
25
+ description: "필수 입력 여부",
26
+ },
27
+ disabled: {
28
+ control: "boolean",
29
+ options: ["true", "false"],
30
+ description: "비활성화 여부",
31
+ },
32
+ error: {
33
+ control: "boolean",
34
+ options: ["true", "false"],
35
+ description: "에러 상태 여부",
36
+ },
37
+ id: {
38
+ control: "text",
39
+ description: "입력 필드의 고유 ID",
40
+ },
41
+ children: {
42
+ table: {
43
+ disable: true,
44
+ },
45
+ },
46
+ },
47
+ };
48
+ exports.default = meta;
49
+ exports.Default = {
50
+ render: (props) => ((0, jsx_runtime_1.jsx)("div", { className: "ui:w-80", children: (0, jsx_runtime_1.jsxs)(FormControl_1.FormControl, { ...props, children: [(0, jsx_runtime_1.jsx)(FormControl_1.FormControl.Label, { children: "\uC774\uBA54\uC77C" }), (0, jsx_runtime_1.jsx)(Input_1.Input, { type: "email", placeholder: "example@baree.net" })] }) })),
51
+ };
52
+ exports.Required = {
53
+ render: (props) => ((0, jsx_runtime_1.jsx)("div", { className: "ui:w-80", children: (0, jsx_runtime_1.jsxs)(FormControl_1.FormControl, { required: true, ...props, children: [(0, jsx_runtime_1.jsx)(FormControl_1.FormControl.Label, { children: "\uC774\uBA54\uC77C" }), (0, jsx_runtime_1.jsx)(Input_1.Input, { type: "email", placeholder: "example@baree.net" })] }) })),
54
+ };
55
+ exports.Disabled = {
56
+ render: (props) => ((0, jsx_runtime_1.jsx)("div", { className: "ui:w-80", children: (0, jsx_runtime_1.jsxs)(FormControl_1.FormControl, { disabled: true, ...props, children: [(0, jsx_runtime_1.jsx)(FormControl_1.FormControl.Label, { children: "\uC774\uBA54\uC77C" }), (0, jsx_runtime_1.jsx)(Input_1.Input, { type: "email", placeholder: "example@baree.net" })] }) })),
57
+ };
58
+ exports.WithError = {
59
+ render: (props) => ((0, jsx_runtime_1.jsx)("div", { className: "ui:w-80", children: (0, jsx_runtime_1.jsxs)(FormControl_1.FormControl, { error: true, ...props, children: [(0, jsx_runtime_1.jsx)(FormControl_1.FormControl.Label, { children: "\uC774\uBA54\uC77C" }), (0, jsx_runtime_1.jsx)(Input_1.Input, { type: "email", placeholder: "example@baree.net" }), (0, jsx_runtime_1.jsx)(FormControl_1.FormControl.Validation, { children: "\uC62C\uBC14\uB978 \uC774\uBA54\uC77C \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4" })] }) })),
60
+ };
61
+ /**
62
+ * 필수 입력이면서 에러 상태인 필드입니다.
63
+ */
64
+ exports.RequiredWithError = {
65
+ render: (props) => ((0, jsx_runtime_1.jsx)("div", { className: "ui:w-80", children: (0, jsx_runtime_1.jsxs)(FormControl_1.FormControl, { required: true, error: true, ...props, children: [(0, jsx_runtime_1.jsx)(FormControl_1.FormControl.Label, { children: "\uBE44\uBC00\uBC88\uD638" }), (0, jsx_runtime_1.jsx)(Input_1.Input, { type: "password", placeholder: "8\uC790 \uC774\uC0C1 \uC785\uB825" }), (0, jsx_runtime_1.jsx)(FormControl_1.FormControl.Validation, { children: "\uBE44\uBC00\uBC88\uD638\uB294 \uCD5C\uC18C 8\uC790 \uC774\uC0C1\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" })] }) })),
66
+ };
67
+ /**
68
+ * 시각적으로 숨겨진 라벨입니다. 접근성은 유지됩니다.
69
+ */
70
+ exports.VisuallyHiddenLabel = {
71
+ render: (props) => ((0, jsx_runtime_1.jsx)("div", { className: "ui:w-80", children: (0, jsx_runtime_1.jsxs)(FormControl_1.FormControl, { ...props, children: [(0, jsx_runtime_1.jsx)(FormControl_1.FormControl.Label, { visuallyHidden: true, children: "\uAC80\uC0C9" }), (0, jsx_runtime_1.jsx)(Input_1.Input, { type: "search", placeholder: "\uAC80\uC0C9\uC5B4\uB97C \uC785\uB825\uD558\uC138\uC694" })] }) })),
72
+ };
73
+ exports.MultipleInputTypes = {
74
+ render: (props) => ((0, jsx_runtime_1.jsxs)("div", { className: "ui:space-y-6 ui:w-80", children: [(0, jsx_runtime_1.jsxs)(FormControl_1.FormControl, { required: true, ...props, children: [(0, jsx_runtime_1.jsx)(FormControl_1.FormControl.Label, { children: "\uC774\uBA54\uC77C" }), (0, jsx_runtime_1.jsx)(Input_1.Input, { type: "email", placeholder: "example@baree.net" })] }), (0, jsx_runtime_1.jsxs)(FormControl_1.FormControl, { required: true, ...props, children: [(0, jsx_runtime_1.jsx)(FormControl_1.FormControl.Label, { children: "\uBE44\uBC00\uBC88\uD638" }), (0, jsx_runtime_1.jsx)(Input_1.Input, { type: "password", placeholder: "8\uC790 \uC774\uC0C1 \uC785\uB825" })] }), (0, jsx_runtime_1.jsxs)(FormControl_1.FormControl, { ...props, children: [(0, jsx_runtime_1.jsx)(FormControl_1.FormControl.Label, { children: "\uC804\uD654\uBC88\uD638" }), (0, jsx_runtime_1.jsx)(Input_1.Input, { type: "tel", placeholder: "010-1234-5678" })] }), (0, jsx_runtime_1.jsxs)(FormControl_1.FormControl, { ...props, children: [(0, jsx_runtime_1.jsx)(FormControl_1.FormControl.Label, { children: "\uB0A0\uC9DC" }), (0, jsx_runtime_1.jsx)(Input_1.Input, { type: "date" })] })] })),
75
+ };
@@ -0,0 +1,20 @@
1
+ import { ComponentPropsWithRef } from "react";
2
+ import { ChildrenProps } from "../../types/props";
3
+ import { VariantProps } from "class-variance-authority";
4
+ declare const labelVariants: (props?: ({
5
+ required?: boolean | null | undefined;
6
+ error?: boolean | null | undefined;
7
+ disabled?: boolean | null | undefined;
8
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
+ type FormControlLabelProps = ComponentPropsWithRef<"label"> & ChildrenProps & VariantProps<typeof labelVariants> & {
10
+ /**
11
+ * 시각적으로 숨김 처리 (접근성 유지)
12
+ */
13
+ visuallyHidden?: boolean;
14
+ };
15
+ export declare function FormControlLabel({ visuallyHidden, className, children, ...props }: FormControlLabelProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare namespace FormControlLabel {
17
+ var displayName: string;
18
+ }
19
+ export {};
20
+ //# sourceMappingURL=FormControlLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormControlLabel.d.ts","sourceRoot":"","sources":["../../../src/components/FormControl/FormControlLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAI7D,QAAA,MAAM,aAAa;;;;8EAmBjB,CAAC;AAEH,KAAK,qBAAqB,GAAG,qBAAqB,CAAC,OAAO,CAAC,GACzD,aAAa,GACb,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IACnC;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEJ,wBAAgB,gBAAgB,CAAC,EAC/B,cAAc,EACd,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,qBAAqB,2CAgBvB;yBArBe,gBAAgB"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormControlLabel = FormControlLabel;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const class_variance_authority_1 = require("class-variance-authority");
6
+ const FormControl_1 = require("./FormControl");
7
+ const style_1 = require("../../utils/style");
8
+ const labelVariants = (0, class_variance_authority_1.cva)("ui:text-body6", {
9
+ variants: {
10
+ required: {
11
+ true: "after:ui:content-['*'] after:ui:ml-0.5 after:ui:text-red-500",
12
+ },
13
+ error: {
14
+ true: "ui:text-red-500",
15
+ false: "",
16
+ },
17
+ disabled: {
18
+ true: "ui:text-gray-300",
19
+ false: "",
20
+ },
21
+ },
22
+ defaultVariants: {
23
+ required: false,
24
+ disabled: false,
25
+ error: false,
26
+ },
27
+ });
28
+ function FormControlLabel({ visuallyHidden, className, children, ...props }) {
29
+ const { id, required, disabled, labelId, error } = (0, FormControl_1.useFormControl)();
30
+ return ((0, jsx_runtime_1.jsx)("label", { id: labelId, htmlFor: id, className: (0, style_1.cn)(labelVariants({ required, disabled, error, className }), visuallyHidden && "ui:sr-only"), ...props, children: children }));
31
+ }
32
+ FormControlLabel.displayName = "FormControl.Label";
@@ -0,0 +1,13 @@
1
+ import { ComponentPropsWithRef } from "react";
2
+ import { ChildrenProps } from "../../types/props";
3
+ import { VariantProps } from "class-variance-authority";
4
+ declare const validationVariants: (props?: ({
5
+ variant?: "error" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ type FormControlValidationProps = ComponentPropsWithRef<"div"> & ChildrenProps & VariantProps<typeof validationVariants>;
8
+ export declare function FormControlValidation({ variant, className, children, ...props }: FormControlValidationProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare namespace FormControlValidation {
10
+ var displayName: string;
11
+ }
12
+ export {};
13
+ //# sourceMappingURL=FormControlValidation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormControlValidation.d.ts","sourceRoot":"","sources":["../../../src/components/FormControl/FormControlValidation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAI7D,QAAA,MAAM,kBAAkB;;8EAYvB,CAAC;AACF,KAAK,0BAA0B,GAAG,qBAAqB,CAAC,KAAK,CAAC,GAC5D,aAAa,GACb,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE1C,wBAAgB,qBAAqB,CAAC,EACpC,OAAO,EACP,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,0BAA0B,2CAa5B;yBAlBe,qBAAqB"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormControlValidation = FormControlValidation;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const class_variance_authority_1 = require("class-variance-authority");
6
+ const FormControl_1 = require("./FormControl");
7
+ const style_1 = require("../../utils/style");
8
+ const validationVariants = (0, class_variance_authority_1.cva)("ui:text-caption1 ui:flex ui:items-center ui:gap-1", {
9
+ variants: {
10
+ variant: {
11
+ error: "ui:text-red-500",
12
+ },
13
+ },
14
+ defaultVariants: {
15
+ variant: "error",
16
+ },
17
+ });
18
+ function FormControlValidation({ variant, className, children, ...props }) {
19
+ const { validationId } = (0, FormControl_1.useFormControl)();
20
+ return ((0, jsx_runtime_1.jsx)("div", { id: validationId, role: "alert", className: (0, style_1.cn)(validationVariants({ variant, className })), ...props, children: children }));
21
+ }
22
+ FormControlValidation.displayName = "FormControl.Validation";
@@ -0,0 +1,2 @@
1
+ export { FormControl } from "./FormControl";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormControl = void 0;
4
+ var FormControl_1 = require("./FormControl");
5
+ Object.defineProperty(exports, "FormControl", { enumerable: true, get: function () { return FormControl_1.FormControl; } });
@@ -12,6 +12,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
12
12
  * ```
13
13
  */
14
14
  function IconPlaceLine({ className, width = 24, height = 24, ...props }) {
15
- return ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height, fill: "none", viewBox: "0 0 24 24", className: className, ...props, children: [(0, jsx_runtime_1.jsx)("path", { fill: "currentColor", fillRule: "evenodd", d: "M12.194 7.144a3.78 3.78 0 0 1 3.586 3.776l-.005.194A3.78 3.78 0 0 1 12 14.7l-.194-.005a3.78 3.78 0 0 1-3.581-3.581l-.005-.194A3.78 3.78 0 0 1 12 7.14zM12 8.64a2.28 2.28 0 1 0 0 4.562 2.28 2.28 0 0 0 0-4.562", clipRule: "evenodd" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", fillRule: "evenodd", d: "M12 1.65a9 9 0 0 1 9 9c0 6.768-8.524 11.697-9 11.7-.474-.002-9.001-4.931-9.001-11.7 0-4.971 4.03-9 9.001-9m0 1.5a7.5 7.5 0 0 0-7.501 7.5c0 2.76 1.763 5.315 3.856 7.3a21 21 0 0 0 2.863 2.27c.304.2.57.358.781.477.21-.12.477-.276.782-.477a21 21 0 0 0 2.863-2.27c2.093-1.985 3.856-4.54 3.856-7.3a7.5 7.5 0 0 0-7.5-7.5", clipRule: "evenodd" })] }));
15
+ return ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height, fill: "none", viewBox: "0 0 24 24", className: className, ...props, children: [(0, jsx_runtime_1.jsx)("path", { fill: "currentColor", fillRule: "evenodd", d: "M12.194 7.144a3.78 3.78 0 0 1 3.586 3.776l-.005.194A3.78 3.78 0 0 1 12 14.7l-.194-.005a3.78 3.78 0 0 1-3.581-3.581l-.005-.194A3.78 3.78 0 0 1 12 7.14zM12 8.64a2.28 2.28 0 1 0 0 4.562 2.28 2.28 0 0 0 0-4.562", clipRule: "evenodd" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", fillRule: "evenodd", d: "M12 1.649a9 9 0 0 1 9 9c0 6.769-8.524 11.698-9 11.701-.474-.002-9.001-4.932-9.001-11.701 0-4.97 4.03-9 9.001-9m0 1.5a7.5 7.5 0 0 0-7.501 7.5c0 2.761 1.763 5.316 3.856 7.302a21 21 0 0 0 2.863 2.27c.304.2.57.357.781.476.21-.12.477-.277.782-.477a21 21 0 0 0 2.863-2.27c2.093-1.985 3.856-4.54 3.856-7.301a7.5 7.5 0 0 0-7.5-7.5", clipRule: "evenodd" })] }));
16
16
  }
17
17
  exports.default = IconPlaceLine;
@@ -0,0 +1,28 @@
1
+ import { ComponentPropsWithRef } from "react";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import { inputVariants } from "./Input.styles";
4
+ export type InputProps = ComponentPropsWithRef<"input"> & VariantProps<typeof inputVariants>;
5
+ /**
6
+ * `Input`: 텍스트 입력을 위한 기본 컴포넌트입니다. FormControl과 함께 사용하면 label, validation 등의 기능을 자동으로 제공받습니다.
7
+ * @see [RDS Storybook: Input](https://main--691ac7d6da1eb0c0acb5f3e2.chromatic.com/?path=/docs/components-input--docs)
8
+ * @see [RDS Storybook: FormControl](https://main--691ac7d6da1eb0c0acb5f3e2.chromatic.com/?path=/docs/components-formcontrol--docs)
9
+ * @example
10
+ * ```tsx
11
+ * // 독립적으로 사용
12
+ * <Input
13
+ * placeholder="이메일을 입력하세요"
14
+ * onChange={(e) => setEmail(e.target.value)}
15
+ * />
16
+ *
17
+ * // FormControl과 함께 사용
18
+ * <FormControl required>
19
+ * <FormControl.Label>이메일</FormControl.Label>
20
+ * <Input type="email" />
21
+ * </FormControl>
22
+ * ```
23
+ */
24
+ export declare function Input({ variant, disabled, className, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
25
+ export declare namespace Input {
26
+ var displayName: string;
27
+ }
28
+ //# sourceMappingURL=Input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,MAAM,UAAU,GAAG,qBAAqB,CAAC,OAAO,CAAC,GACrD,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;AAErC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,KAAK,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAQ3E;yBARe,KAAK"}
@@ -0,0 +1,30 @@
1
+ "use client";
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Input = Input;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const style_1 = require("../../utils/style");
7
+ const Input_styles_1 = require("./Input.styles");
8
+ /**
9
+ * `Input`: 텍스트 입력을 위한 기본 컴포넌트입니다. FormControl과 함께 사용하면 label, validation 등의 기능을 자동으로 제공받습니다.
10
+ * @see [RDS Storybook: Input](https://main--691ac7d6da1eb0c0acb5f3e2.chromatic.com/?path=/docs/components-input--docs)
11
+ * @see [RDS Storybook: FormControl](https://main--691ac7d6da1eb0c0acb5f3e2.chromatic.com/?path=/docs/components-formcontrol--docs)
12
+ * @example
13
+ * ```tsx
14
+ * // 독립적으로 사용
15
+ * <Input
16
+ * placeholder="이메일을 입력하세요"
17
+ * onChange={(e) => setEmail(e.target.value)}
18
+ * />
19
+ *
20
+ * // FormControl과 함께 사용
21
+ * <FormControl required>
22
+ * <FormControl.Label>이메일</FormControl.Label>
23
+ * <Input type="email" />
24
+ * </FormControl>
25
+ * ```
26
+ */
27
+ function Input({ variant, disabled, className, ...props }) {
28
+ return ((0, jsx_runtime_1.jsx)("input", { disabled: disabled, className: (0, style_1.cn)((0, Input_styles_1.inputVariants)({ variant, disabled, className })), ...props }));
29
+ }
30
+ Input.displayName = "Input";
@@ -0,0 +1,34 @@
1
+ import type { StoryObj } from "@storybook/react";
2
+ import { Input } from "./Input";
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof Input;
6
+ tags: string[];
7
+ parameters: {
8
+ layout: string;
9
+ docs: {
10
+ description: {
11
+ component: string;
12
+ };
13
+ };
14
+ };
15
+ argTypes: {
16
+ variant: {
17
+ control: {
18
+ type: "radio";
19
+ };
20
+ options: string[];
21
+ };
22
+ disabled: {
23
+ control: {
24
+ type: "boolean";
25
+ };
26
+ options: string[];
27
+ };
28
+ };
29
+ };
30
+ export default meta;
31
+ type Story = StoryObj<typeof meta>;
32
+ export declare const Default: Story;
33
+ export declare const Error: Story;
34
+ //# sourceMappingURL=Input.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BoB,CAAC;AAE/B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KA2BrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KA2BnB,CAAC"}