diff --git a/src/constants/color.ts b/src/constants/color.ts
index deb6592..2ee34a6 100644
--- a/src/constants/color.ts
+++ b/src/constants/color.ts
@@ -1,7 +1,6 @@
export const THEME_COLOR = {
WHITE: "white",
BLACK: "black",
- GRAY_09: "gray-09",
GRAY_08: "gray-08",
GRAY_07: "gray-07",
GRAY_06: "gray-06",
diff --git a/src/constants/index.ts b/src/constants/index.ts
index e094821..2ea4323 100644
--- a/src/constants/index.ts
+++ b/src/constants/index.ts
@@ -1,7 +1,6 @@
export const ColorOptions = [
"white",
"black",
- "gray-09",
"gray-08",
"gray-07",
"gray-06",
diff --git a/src/core/components/Calendar/DatePickerCalendar/DatePickerCalendar.stories.tsx b/src/core/components/Calendar/DatePickerCalendar/DatePickerCalendar.stories.tsx
index 4e8e454..5af837a 100644
--- a/src/core/components/Calendar/DatePickerCalendar/DatePickerCalendar.stories.tsx
+++ b/src/core/components/Calendar/DatePickerCalendar/DatePickerCalendar.stories.tsx
@@ -2,7 +2,6 @@ import { Meta } from "@storybook/react";
import { useState } from "react";
import DatePickerCalendar from "@/core/components/Calendar/DatePickerCalendar";
-import { DATE_PICKER_TYPE } from "./constants";
import { PeriodDates } from "./types/DatePickerCalendarProps";
const meta = {
@@ -26,7 +25,7 @@ export const SingleDatePicker = () => {
{
return (
{
return;
}
- if (variants === DATE_PICKER_TYPE["PERIOD"] && periodDates.startDate) {
+ if (variants === "period" && periodDates.startDate) {
if (!dayjs(periodDates.startDate).isAfter(calendarDate.dayjs)) {
newPeriodDates.endDate = currentDate;
} else {
@@ -83,7 +82,7 @@ export const useDatePickerCalendar = (): UseDatePickerCalendarResponse => {
};
const DatePickerCalendar = ({
- variants = DATE_PICKER_TYPE["SINGLE"],
+ variants = "single",
label = ["사용일"],
initialDate,
periodDates,
diff --git a/src/core/components/Demo/Demo.stories.tsx b/src/core/components/Demo/Demo.stories.tsx
new file mode 100644
index 0000000..6ec41a9
--- /dev/null
+++ b/src/core/components/Demo/Demo.stories.tsx
@@ -0,0 +1,14 @@
+import { Meta } from "@storybook/react";
+import Demo from "./index";
+
+const meta = {
+ title: "core/Demo",
+ component: Demo,
+ argTypes: {},
+} satisfies Meta;
+
+export default meta;
+
+export const Default = {
+ args: {},
+};
diff --git a/src/core/components/Demo/index.tsx b/src/core/components/Demo/index.tsx
new file mode 100644
index 0000000..76154dd
--- /dev/null
+++ b/src/core/components/Demo/index.tsx
@@ -0,0 +1,7 @@
+const Demo = () => {
+ return (
+ 데모
+ );
+};
+
+export default Demo;
diff --git a/src/core/components/Dropdown/DropdownBase/DropdownTrigger.tsx b/src/core/components/Dropdown/DropdownBase/DropdownTrigger.tsx
index e99ae00..9a17ddd 100644
--- a/src/core/components/Dropdown/DropdownBase/DropdownTrigger.tsx
+++ b/src/core/components/Dropdown/DropdownBase/DropdownTrigger.tsx
@@ -13,13 +13,10 @@ const DropdownTrigger = forwardRef((
}: DropdownTriggerProps,
ref: React.Ref,
) => {
- const { isToggle, readOnly, disabled, setIsToggle } = useContext(DropdownContext) as DropdownContextValue;
- const content = typeof children === "function" ? children({ isToggle, readOnly, disabled }) : children;
- const isDisabled = readOnly || disabled;
+ const { isToggle, setIsToggle } = useContext(DropdownContext) as DropdownContextValue;
+ const content = typeof children === "function" ? children({ isToggle }) : children;
const onClickHandler = (e: React.MouseEvent) => {
- if(isDisabled) return;
-
setIsToggle(v => !v);
onClick?.(e);
};
@@ -29,11 +26,9 @@ const DropdownTrigger = forwardRef((
ref = {ref}
type = "button"
onClick = {onClickHandler}
- className = {clsx("whitespace-nowrap cursor-pointer", isDisabled && "!cursor-not-allowed bg-gray-09", className)}
+ className = {clsx("whitespace-nowrap cursor-pointer", className)}
aria-haspopup = "listbox"
aria-expanded = {isToggle}
- aria-disabled = {disabled}
- aria-readonly = {readOnly}
{...props}
>
{content}
diff --git a/src/core/components/Dropdown/DropdownBase/index.tsx b/src/core/components/Dropdown/DropdownBase/index.tsx
index 4ac1f6f..a5e6cab 100644
--- a/src/core/components/Dropdown/DropdownBase/index.tsx
+++ b/src/core/components/Dropdown/DropdownBase/index.tsx
@@ -10,16 +10,15 @@ import { DropdownContextValue, DropdownProps, ReturnType } from "./types";
export const DropdownContext = createContext(undefined);
DropdownContext.displayName = "DropdownContext";
-const DropdownBase = ({ className, readOnly = false, disabled = false, trigger, content }: DropdownProps) => {
+const DropdownBase = ({ className, trigger, content }: DropdownProps) => {
const [ isToggle, setIsToggle ] = useState(false);
const { contentRef } = useClickOutside(() => setIsToggle(false));
- const isVisibleContent = !readOnly && !disabled && isToggle;
return (
-
+
{trigger}
- {isVisibleContent && content}
+ {isToggle && content}
);
diff --git a/src/core/components/Dropdown/DropdownBase/types/index.ts b/src/core/components/Dropdown/DropdownBase/types/index.ts
index 2b3a4ca..41be6e0 100644
--- a/src/core/components/Dropdown/DropdownBase/types/index.ts
+++ b/src/core/components/Dropdown/DropdownBase/types/index.ts
@@ -4,17 +4,15 @@ import DropdownItems from "../DropdownItems";
import DropdownTrigger from "../DropdownTrigger";
export interface DropdownProps {
- className?: string;
- disabled?: boolean;
- readOnly?: boolean;
- trigger: React.ReactNode;
- content: React.ReactNode;
+ className?: string,
+ trigger: React.ReactNode,
+ content: React.ReactNode,
}
-export interface DropdownContextValue extends Pick {
+export type DropdownContextValue = {
isToggle: boolean;
setIsToggle: Dispatch>;
-}
+};
export interface DropdownItemProps extends HTMLAttributes {}
@@ -24,7 +22,7 @@ export interface DropdownItemsProps extends HTMLAttributes{
export interface DropdownTriggerProps extends Omit, "children"> {
onClick?: (e: React.MouseEvent) => void;
- children: React.ReactNode | ((props: Pick) => React.ReactNode);
+ children: React.ReactNode | ((props: { isToggle: boolean }) => React.ReactNode);
}
type Dropdown = (props: DropdownProps) => React.ReactElement;
diff --git a/src/core/components/Dropdown/DropdownSelect/DropdownSelectTrigger.tsx b/src/core/components/Dropdown/DropdownSelect/DropdownSelectTrigger.tsx
index 93f77e4..74ec89c 100644
--- a/src/core/components/Dropdown/DropdownSelect/DropdownSelectTrigger.tsx
+++ b/src/core/components/Dropdown/DropdownSelect/DropdownSelectTrigger.tsx
@@ -18,17 +18,12 @@ const DropdownSelectTrigger = forwardRef((
return (
- {({ isToggle, disabled, readOnly }) => {
- const isDisabled = readOnly || disabled;
- const isVisibleContent = !readOnly && !disabled && isToggle;
-
- return (
- <>
-
- {!isDisabled ? : null}
- >
- );
- }}
+ {({ isToggle }) => (
+ <>
+
+
+ >
+ )}
);
});
diff --git a/src/core/components/Input/InputBase/index.tsx b/src/core/components/Input/InputBase/index.tsx
index a9bda83..11e3a95 100644
--- a/src/core/components/Input/InputBase/index.tsx
+++ b/src/core/components/Input/InputBase/index.tsx
@@ -9,29 +9,26 @@ import { InputBaseProps } from "./types";
const InputBase = forwardRef(
(
{
- label,
inputId,
- rootClassName,
element: Element,
+ rootClassName,
inputRootClassName,
+ label,
startComponent,
inputComponent,
endComponent,
labelColor,
- feedback,
borderColor = "gray-03",
- feedbackColor = "error",
error = false,
- disabled = false,
- readOnly = false,
- required = false,
+ required,
+ readOnly,
+ feedback,
+ feedbackColor = "error",
...props
}: InputBaseProps,
ref: React.ComponentPropsWithRef["ref"],
) => {
const Component: React.ElementType = Element || "div";
- const isDisabled = readOnly || disabled;
- const isVisibleEndComponent = !isDisabled && endComponent;
return (
@@ -42,16 +39,15 @@ const InputBase = forwardRef(
}
{startComponent && startComponent}
{inputComponent && inputComponent}
- {isVisibleEndComponent && endComponent}
+ {!readOnly && endComponent && endComponent}
{feedback ? : null}
diff --git a/src/core/components/Input/InputBase/types/index.ts b/src/core/components/Input/InputBase/types/index.ts
index ce7c07e..0f81196 100644
--- a/src/core/components/Input/InputBase/types/index.ts
+++ b/src/core/components/Input/InputBase/types/index.ts
@@ -15,7 +15,6 @@ export interface InputBaseProps extends React.HTMLA
borderColor?: ThemeColors;
error?: boolean
readOnly?: boolean;
- disabled?: boolean;
feedback?: React.ReactNode;
feedbackColor?: ThemeColors;
}
diff --git a/src/core/components/Input/InputDatePicker/DatePicker.tsx b/src/core/components/Input/InputDatePicker/DatePicker.tsx
index 045c4cd..2cfa4c1 100644
--- a/src/core/components/Input/InputDatePicker/DatePicker.tsx
+++ b/src/core/components/Input/InputDatePicker/DatePicker.tsx
@@ -2,7 +2,6 @@ import { useEffect, useId, useState } from "react";
import Button from "../../Button";
import DatePickerCalendar from "../../Calendar/DatePickerCalendar";
-import { DATE_PICKER_TYPE } from "../../Calendar/DatePickerCalendar/constants";
import { PeriodDates } from "../../Calendar/DatePickerCalendar/types/DatePickerCalendarProps";
import Divider from "../../Divider";
import ModalPopUp from "../../Modal/ModalPopUp";
@@ -11,7 +10,7 @@ import Typography from "../../Typography";
import { DatePickerProps } from "./types";
const DatePicker = ({
- variants = DATE_PICKER_TYPE["PERIOD"],
+ variants = "period",
cutoffDate,
cutoffAfterDate,
isOpen,
diff --git a/src/core/components/Input/InputDatePicker/index.tsx b/src/core/components/Input/InputDatePicker/index.tsx
index 791f3b1..769cdfb 100644
--- a/src/core/components/Input/InputDatePicker/index.tsx
+++ b/src/core/components/Input/InputDatePicker/index.tsx
@@ -3,14 +3,13 @@ import clsx from "clsx";
import dayjs from "dayjs";
import { HTMLAttributes, useEffect, useId, useState } from "react";
-import { DATE_PICKER_TYPE } from "../../Calendar/DatePickerCalendar/constants";
import { PeriodDates } from "../../Calendar/DatePickerCalendar/types/DatePickerCalendarProps";
import InputBase from "../InputBase";
import DatePicker from "./DatePicker";
import { InputDatePickerProps } from "./types";
const InputDatePicker = ({
- variants = DATE_PICKER_TYPE["PERIOD"],
+ variants = "period",
cutoffDate,
cutoffAfterDate,
overlay,
@@ -21,7 +20,6 @@ const InputDatePicker = ({
useTab = false,
useHoliday = false,
disabled = false,
- readOnly = false,
required = false,
className,
inputClassName,
@@ -32,7 +30,7 @@ const InputDatePicker = ({
placeholder,
feedback,
feedbackColor,
-}: InputDatePickerProps & Omit, "disabled" | "readOnly">) => {
+}: InputDatePickerProps & HTMLAttributes) => {
const id = useId();
const [ periodDates, setPeriodDates ] = useState({
startDate: "",
@@ -40,14 +38,13 @@ const InputDatePicker = ({
});
const startDate = dayjs(periodDates.startDate).format("YYYY. MM. DD");
const endDate = dayjs(periodDates.endDate).format("YYYY. MM. DD");
- const isDisabled = readOnly || disabled;
const onDatePickerClick = (): Promise => {
return new Promise(resolve => {
overlay.open(({ isOpen, close }) => (
{
resolve(periodDates);
@@ -69,8 +66,7 @@ const InputDatePicker = ({
};
const handleDatePicker = async () => {
- if (isDisabled) return;
-
+ if (disabled) return;
const periodDates = await onDatePickerClick();
setPeriodDates(periodDates);
};
@@ -87,29 +83,24 @@ const InputDatePicker = ({
false}
onFocus = {(e: React.FocusEvent) => e.target.blur()}
onChange = {() => {}}
onInvalid = {handleOnInvalid}
disabled = {disabled}
- readOnly = {readOnly}
- aria-disabled = {disabled}
- aria-readonly = {readOnly}
required = {required}
/>
}
diff --git a/src/core/components/Input/InputDatePicker/types/index.ts b/src/core/components/Input/InputDatePicker/types/index.ts
index edd5ee3..5353a2e 100644
--- a/src/core/components/Input/InputDatePicker/types/index.ts
+++ b/src/core/components/Input/InputDatePicker/types/index.ts
@@ -24,7 +24,7 @@ export interface ExternalDates {
export interface InputDatePickerProps extends
Omit,
- Pick, "feedback" | "feedbackColor" | "disabled" | "readOnly"> {
+ Pick, "feedback" | "feedbackColor"> {
required?: boolean;
inputClassName?: string;
label?: string;
diff --git a/src/core/components/Input/InputPassword/index.tsx b/src/core/components/Input/InputPassword/index.tsx
index 5e43955..f5c4986 100644
--- a/src/core/components/Input/InputPassword/index.tsx
+++ b/src/core/components/Input/InputPassword/index.tsx
@@ -18,7 +18,7 @@ const InputPassword = forwardRef((
) => {
const id = useId();
const [ showPassword, setShowPassword ] = useState(false);
- const { readOnly = false, disabled = false, rootClassName, className, required = false, value, onChange, autoComplete = "off", error = false, name, ...rest } = props;
+ const { readOnly, rootClassName, className, required, value, onChange, autoComplete = "off", error, name, ...rest } = props;
const { inputValue, onChangeHandler } = useInput({ value, regCallback, onChange, name });
const ShowPasswordIcon = ;
const HidePasswordIcon = ;
@@ -33,7 +33,6 @@ const InputPassword = forwardRef((
inputRootClassName = "h-[3.75rem]"
error = {error}
readOnly = {readOnly}
- disabled = {disabled}
required = {required}
feedback = {feedback}
labelColor = {labelColor}
@@ -45,12 +44,8 @@ const InputPassword = forwardRef((
type = {showPassword ? "text" : "password"}
required = {required}
value = {inputValue}
- readOnly = {readOnly}
- disabled = {disabled}
onChange = {onChangeHandler}
autoComplete = {autoComplete}
- aria-disabled = {disabled}
- aria-readonly = {readOnly}
placeholder = {"********"}
name = {name}
{...rest}
diff --git a/src/core/components/Input/InputPassword/types/index.ts b/src/core/components/Input/InputPassword/types/index.ts
index 724ea21..691d929 100644
--- a/src/core/components/Input/InputPassword/types/index.ts
+++ b/src/core/components/Input/InputPassword/types/index.ts
@@ -2,6 +2,6 @@ import { InputBaseProps } from "../../InputBase/types";
import { UseInputProps } from "../../hooks/useInput";
export interface InputPasswordProps
- extends Omit, "readOnly" | "disabled">,
- Pick, "feedback" | "rootClassName" | "label" | "error" | "labelColor" | "readOnly" | "disabled">,
+ extends React.InputHTMLAttributes,
+ Pick, "feedback" | "rootClassName" | "label" | "error" | "labelColor">,
Pick {}
diff --git a/src/core/components/Input/InputSearch/InputSearch.stories.tsx b/src/core/components/Input/InputSearch/InputSearch.stories.tsx
index f87a0d4..0eb20f7 100644
--- a/src/core/components/Input/InputSearch/InputSearch.stories.tsx
+++ b/src/core/components/Input/InputSearch/InputSearch.stories.tsx
@@ -13,14 +13,6 @@ const meta = {
regCallback: {
description: "Input RegEx",
},
- readOnly: {
- control: "boolean",
- description: "Input readOnly",
- },
- disabled: {
- control: "boolean",
- description: "Input disabled",
- },
},
} satisfies Meta;
diff --git a/src/core/components/Input/InputSearch/index.tsx b/src/core/components/Input/InputSearch/index.tsx
index b96eef4..a36b041 100644
--- a/src/core/components/Input/InputSearch/index.tsx
+++ b/src/core/components/Input/InputSearch/index.tsx
@@ -17,7 +17,7 @@ const InputSearch = forwardRef((
) => {
const id = useId();
const formRef = useRef(null);
- const { readOnly = false, disabled = false, rootClassName, className, value, onChange, autoComplete = "off", error = false, name, ...rest } = props;
+ const { rootClassName, className, value, onChange, autoComplete = "off", error, name, ...rest } = props;
const { inputValue, onChangeHandler, onResetInputValue } = useInput({ value, regCallback, onChange, name });
const SearchIcon = ;
@@ -38,8 +38,6 @@ const InputSearch = forwardRef((
ref = {formRef}
error = {error}
feedback = {feedback}
- readOnly = {readOnly}
- disabled = {disabled}
rootClassName = {rootClassName}
inputRootClassName = {"flex items-center px-6 py-2 text-body-02-medium bg-white rounded-full overflow-hidden border border-gray-02"}
onSubmit = {onSubmitHandler}
@@ -52,10 +50,6 @@ const InputSearch = forwardRef((
value = {inputValue}
onChange = {onChangeHandler}
autoComplete = {autoComplete}
- readOnly = {readOnly}
- disabled = {disabled}
- aria-disabled = {disabled}
- aria-readonly = {readOnly}
name = {name}
required
{...rest}
diff --git a/src/core/components/Input/InputSearch/types/index.ts b/src/core/components/Input/InputSearch/types/index.ts
index ccb325c..6f99313 100644
--- a/src/core/components/Input/InputSearch/types/index.ts
+++ b/src/core/components/Input/InputSearch/types/index.ts
@@ -2,8 +2,8 @@ import { InputBaseProps } from "../../InputBase/types";
import { UseInputProps } from "../../hooks/useInput";
export interface InputSearchProps
- extends Omit, "readOnly" | "disabled">,
- Pick, "feedback" | "rootClassName" | "error" | "readOnly" | "disabled">,
+ extends React.InputHTMLAttributes,
+ Pick, "feedback" | "rootClassName" | "error">,
Pick {
formSubmitHandler?: (e: React.FormEvent) => void;
}
diff --git a/src/core/components/Input/InputTextArea/InputTextArea.stories.tsx b/src/core/components/Input/InputTextArea/InputTextArea.stories.tsx
index c1dfdc6..0077000 100644
--- a/src/core/components/Input/InputTextArea/InputTextArea.stories.tsx
+++ b/src/core/components/Input/InputTextArea/InputTextArea.stories.tsx
@@ -25,14 +25,6 @@ const meta = {
regCallback: {
description: "Input RegEx",
},
- readOnly: {
- control: "boolean",
- description: "Input readOnly",
- },
- disabled: {
- control: "boolean",
- description: "Input disabled",
- },
},
} satisfies Meta;
diff --git a/src/core/components/Input/InputTextArea/index.tsx b/src/core/components/Input/InputTextArea/index.tsx
index 739d750..4d3162b 100644
--- a/src/core/components/Input/InputTextArea/index.tsx
+++ b/src/core/components/Input/InputTextArea/index.tsx
@@ -20,7 +20,7 @@ const InputTextArea = forwardRef((
ref: React.Ref,
) => {
const id = useId();
- const { readOnly = false, disabled = false, rootClassName, className, required = false, value, onChange, autoComplete = "off", maxLength = 150, error = false, name, ...rest } = props;
+ const { rootClassName, className, required, value, onChange, autoComplete = "off", maxLength = 150, error, name, ...rest } = props;
const { inputValue, onChangeHandler } = useInput({ value, regCallback, onChange, name });
const currentInputValueLength = (inputValue as string)?.length || 0;
@@ -38,8 +38,6 @@ const InputTextArea = forwardRef((
inputRootClassName = {clsx("flex-v-stack", TEXT_AREA_HEIGHT[textAreaHeight])}
feedback = {feedback}
error = {error}
- readOnly = {readOnly}
- disabled = {disabled}
inputComponent = {
diff --git a/src/core/components/Input/InputTextArea/types/index.ts b/src/core/components/Input/InputTextArea/types/index.ts
index cf83d26..58bb0d7 100644
--- a/src/core/components/Input/InputTextArea/types/index.ts
+++ b/src/core/components/Input/InputTextArea/types/index.ts
@@ -5,8 +5,8 @@ import { SIZE } from "../constants";
export type TextAreaSizeType = typeof SIZE[keyof typeof SIZE];
export interface InputTextAreaProps
- extends Omit, "disabled" | "readOnly">,
- Pick, "feedback" | "rootClassName" | "label" | "labelColor" | "borderColor"| "error" | "readOnly" | "disabled">,
+ extends React.TextareaHTMLAttributes,
+ Pick, "feedback" | "rootClassName" | "label" | "labelColor" | "borderColor"| "error">,
Pick {
textAreaHeight: TextAreaSizeType;
maxLength: React.TextareaHTMLAttributes["maxLength"];
diff --git a/src/core/components/Input/InputTextField/InputTextField.stories.tsx b/src/core/components/Input/InputTextField/InputTextField.stories.tsx
index 7ff3f32..9b1f4c8 100644
--- a/src/core/components/Input/InputTextField/InputTextField.stories.tsx
+++ b/src/core/components/Input/InputTextField/InputTextField.stories.tsx
@@ -25,14 +25,6 @@ const meta = {
defaultValue: "gray-03",
description: "Bbodek DesignSystem Colors",
},
- disabled: {
- control: "boolean",
- description: "Input disabled",
- },
- readOnly: {
- control: "boolean",
- description: "Input readOnly",
- },
regCallback: {
description: "Input RegEx",
},
diff --git a/src/core/components/Input/InputTextField/index.tsx b/src/core/components/Input/InputTextField/index.tsx
index 9fffc43..73641a7 100644
--- a/src/core/components/Input/InputTextField/index.tsx
+++ b/src/core/components/Input/InputTextField/index.tsx
@@ -18,7 +18,7 @@ const InputTextField = forwardRef((
ref: React.ComponentPropsWithRef<"input">["ref"],
) => {
const id = useId();
- const { rootClassName, className, required, value, onChange, autoComplete = "off", readOnly = false, error = false, name, disabled = false, ...rest } = props;
+ const { rootClassName, className, required, value, onChange, autoComplete = "off", readOnly, error, name, ...rest } = props;
const { inputValue, onChangeHandler, onResetInputValue } = useInput({ value, regCallback, onChange, name });
const ResetIcon = ;
@@ -29,7 +29,6 @@ const InputTextField = forwardRef((
rootClassName = {rootClassName}
inputRootClassName = "h-[3.75rem]"
readOnly = {readOnly}
- disabled = {disabled}
feedback = {feedback}
error = {error}
inputComponent = {
@@ -43,9 +42,6 @@ const InputTextField = forwardRef((
onChange = {onChangeHandler}
autoComplete = {autoComplete}
readOnly = {readOnly}
- disabled = {disabled}
- aria-disabled = {disabled}
- aria-readonly = {readOnly}
name = {name}
{...rest}
/>
diff --git a/src/core/components/Input/InputTextField/types/index.ts b/src/core/components/Input/InputTextField/types/index.ts
index b4a79c7..bc3f116 100644
--- a/src/core/components/Input/InputTextField/types/index.ts
+++ b/src/core/components/Input/InputTextField/types/index.ts
@@ -2,6 +2,6 @@ import { InputBaseProps } from "../../InputBase/types";
import { UseInputProps } from "../../hooks/useInput";
export interface InputTextFieldProps
- extends Omit, "readOnly" | "disabled">,
- Pick, "feedback" | "rootClassName" | "label" | "labelColor" | "borderColor" | "error" | "readOnly" | "disabled">,
+ extends React.InputHTMLAttributes,
+ Pick, "feedback" | "rootClassName" | "label" | "labelColor" | "borderColor" | "error">,
Pick {}
diff --git a/src/core/components/Select/SelectBubble/SelectBubble/SelectBubble.stories.tsx b/src/core/components/Select/SelectBubble/SelectBubble/SelectBubble.stories.tsx
new file mode 100644
index 0000000..c368513
--- /dev/null
+++ b/src/core/components/Select/SelectBubble/SelectBubble/SelectBubble.stories.tsx
@@ -0,0 +1,41 @@
+import { Meta } from "@storybook/react";
+import { useState } from "react";
+
+import SelectBubble from "./index";
+
+const meta = {
+ title: "core/Select/SelectBubble/SelectBubble",
+ component: SelectBubble,
+ argTypes: {},
+} satisfies Meta;
+
+export default meta;
+
+export const Default = () => {
+ const [ currentValue, setCurrentValue ] = useState("A");
+ const data = [
+ { key: "A", label: "A반" },
+ { key: "B", label: "B반" },
+ { key: "C", label: "C반" },
+ ];
+
+ const items = data.map(item => (
+ ) => {
+ const { value } = e.target;
+
+ setCurrentValue(value);
+ }}
+ />
+ ));
+
+ return (
+
+
+
+ );
+};
diff --git a/src/core/components/Select/SelectBubble/SelectBubble/index.tsx b/src/core/components/Select/SelectBubble/SelectBubble/index.tsx
new file mode 100644
index 0000000..450f29f
--- /dev/null
+++ b/src/core/components/Select/SelectBubble/SelectBubble/index.tsx
@@ -0,0 +1,34 @@
+import { forwardRef } from "react";
+
+import { FormLabel } from "@/index";
+import clsx from "clsx";
+import SelectBubbleItem from "../SelectBubbleItem";
+import { ReturnType, SelectBubbleProps } from "./types";
+
+const SelectBubble = forwardRef((
+ {
+ items,
+ label,
+ labelColor,
+ required,
+ labelSubText,
+ ...props
+ }: SelectBubbleProps,
+ ref: React.Ref,
+ ) => {
+ const { className, ...rest } = props;
+
+ return (
+
+ );
+}) as unknown as ReturnType;
+
+export default SelectBubble;
+
+SelectBubble.displayName = "SelectBubble";
+SelectBubble.Item = SelectBubbleItem;
diff --git a/src/core/components/Select/SelectBubble/SelectBubble/types/index.ts b/src/core/components/Select/SelectBubble/SelectBubble/types/index.ts
new file mode 100644
index 0000000..f3d7a28
--- /dev/null
+++ b/src/core/components/Select/SelectBubble/SelectBubble/types/index.ts
@@ -0,0 +1,13 @@
+import { FormLabelProps } from "@/core/components/FormLabel/types";
+import SelectBubbleItem from "../../SelectBubbleItem";
+
+export interface SelectBubbleProps extends React.HTMLAttributes, FormLabelProps {
+ items: React.ReactNode[]
+}
+
+type TableTabComponent = (props: SelectBubbleProps) => React.ReactElement;
+
+export type ReturnType = TableTabComponent & {
+ displayName: string;
+ Item: typeof SelectBubbleItem;
+};
diff --git a/src/core/components/Select/SelectBubble/SelectBubbleItem/SelectBubbleItem.stories.tsx b/src/core/components/Select/SelectBubble/SelectBubbleItem/SelectBubbleItem.stories.tsx
new file mode 100644
index 0000000..848ca61
--- /dev/null
+++ b/src/core/components/Select/SelectBubble/SelectBubbleItem/SelectBubbleItem.stories.tsx
@@ -0,0 +1,28 @@
+import { Meta } from "@storybook/react";
+
+import SelectBubble from "../SelectBubble";
+import SelectBubbleItem from "./index";
+import { SelectButtonItemProps } from "./types";
+
+const meta = {
+ title: "core/Select/SelectBubble/SelectBubbleItem",
+ component: SelectBubbleItem,
+ argTypes: {
+ label: {
+ control: "text",
+ description: "Bubble Label",
+ },
+ },
+} satisfies Meta;
+
+export default meta;
+
+export const Default = (props: SelectButtonItemProps) => {
+ const { label, ...rest } = props;
+
+ return (
+
+ );
+};
diff --git a/src/core/components/Select/SelectBubble/SelectBubbleItem/index.tsx b/src/core/components/Select/SelectBubble/SelectBubbleItem/index.tsx
new file mode 100644
index 0000000..76e21b7
--- /dev/null
+++ b/src/core/components/Select/SelectBubble/SelectBubbleItem/index.tsx
@@ -0,0 +1,38 @@
+import { forwardRef, useId } from "react";
+
+import { Typography } from "@/index";
+import { SelectButtonItemProps } from "./types";
+
+const SelectBubbleItem = forwardRef((
+ {
+ label,
+ ...props
+ }: Omit,
+ ref: React.Ref,
+ ) => {
+ const id = useId();
+
+ return (
+
+
+
+ );
+});
+
+export default SelectBubbleItem;
+
+SelectBubbleItem.displayName = "SelectBubbleItem";
diff --git a/src/core/components/Select/SelectBubble/SelectBubbleItem/types/index.ts b/src/core/components/Select/SelectBubble/SelectBubbleItem/types/index.ts
new file mode 100644
index 0000000..c072aab
--- /dev/null
+++ b/src/core/components/Select/SelectBubble/SelectBubbleItem/types/index.ts
@@ -0,0 +1,6 @@
+import { TypographyProps } from "@/core/components/Typography/types";
+import { InputHTMLAttributes } from "react";
+
+export interface SelectButtonItemProps extends InputHTMLAttributes {
+ label: TypographyProps<"span">["text"]
+}
diff --git a/src/core/components/Select/SelectOnset/SelectOnset/SelectOnset.stories.tsx b/src/core/components/Select/SelectOnset/SelectOnset/SelectOnset.stories.tsx
new file mode 100644
index 0000000..133a96f
--- /dev/null
+++ b/src/core/components/Select/SelectOnset/SelectOnset/SelectOnset.stories.tsx
@@ -0,0 +1,47 @@
+import { Meta } from "@storybook/react";
+import { ChangeEvent, useState } from "react";
+
+import { SelectOnsetOptions } from "./constants";
+import SelectOnset from "./index";
+
+const meta = {
+ title: "core/Select/SelectOnset/SelectOnset",
+ component: SelectOnset,
+ argTypes: {
+ variants: {
+ control: "select",
+ options: SelectOnsetOptions,
+ description: "SelectOnset Variants",
+ },
+ },
+} satisfies Meta;
+
+export default meta;
+
+export const Vertical = () => {
+ const [ currentOnset, setCurrentOnset ] = useState("ㄱ");
+
+ const onChangeHandler = (e: ChangeEvent) => setCurrentOnset(e.target.value);
+
+ return (
+
+ );
+};
+
+export const Horizontal = () => {
+ const [ currentOnset, setCurrentOnset ] = useState("ㄱ");
+
+ const onChangeHandler = (e: ChangeEvent) => setCurrentOnset(e.target.value);
+
+ return (
+
+ );
+};
diff --git a/src/core/components/Select/SelectOnset/SelectOnset/constants/index.ts b/src/core/components/Select/SelectOnset/SelectOnset/constants/index.ts
new file mode 100644
index 0000000..424e8c3
--- /dev/null
+++ b/src/core/components/Select/SelectOnset/SelectOnset/constants/index.ts
@@ -0,0 +1,20 @@
+import { VariantsType } from "../types";
+
+export const ONSETS = [ "ㄱ", "ㄴ", "ㄷ", "ㄹ", "ㅁ", "ㅂ", "ㅅ", "ㅇ", "ㅈ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ" ];
+
+export const VARIANTS = {
+ VERTICAL: "vertical",
+ HORIZONTAL: "horizontal",
+} as const;
+
+export const ONSETS_CONTAINER_VARIANTS: Record = {
+ [VARIANTS.VERTICAL]: "flex-v-stack",
+ [VARIANTS.HORIZONTAL]: "flex-h-stack items-center",
+};
+
+export const ONSETS_VARIANTS: Record = {
+ [VARIANTS.VERTICAL]: "gap-x-2",
+ [VARIANTS.HORIZONTAL]: "gap-x-3",
+};
+
+export const SelectOnsetOptions = Object.keys(VARIANTS).map(variants => VARIANTS[variants as keyof typeof VARIANTS]);
diff --git a/src/core/components/Select/SelectOnset/SelectOnset/index.tsx b/src/core/components/Select/SelectOnset/SelectOnset/index.tsx
new file mode 100644
index 0000000..4d532bc
--- /dev/null
+++ b/src/core/components/Select/SelectOnset/SelectOnset/index.tsx
@@ -0,0 +1,35 @@
+import clsx from "clsx";
+import { forwardRef } from "react";
+
+import Typography from "../../../Typography";
+import SelectOnsetItem from "../SelectOnsetItem";
+import { ONSETS, ONSETS_CONTAINER_VARIANTS, ONSETS_VARIANTS } from "./constants";
+import { SelectOnsetProps } from "./types";
+
+const SelectOnset = forwardRef((
+ {
+ variants,
+ currentOnset,
+ onChange,
+ className,
+ }: SelectOnsetProps,
+ ref: React.Ref,
+ ) => {
+ const items = ONSETS.map(onset => (
+
+ ));
+
+ return (
+
+ );
+});
+
+export default SelectOnset;
+
+SelectOnset.displayName = "SelectOnset";
+
diff --git a/src/core/components/Select/SelectOnset/SelectOnset/types/index.ts b/src/core/components/Select/SelectOnset/SelectOnset/types/index.ts
new file mode 100644
index 0000000..1743bbb
--- /dev/null
+++ b/src/core/components/Select/SelectOnset/SelectOnset/types/index.ts
@@ -0,0 +1,13 @@
+import { InputHTMLAttributes } from "react";
+
+import { ONSETS, VARIANTS } from "../constants";
+
+export type VariantsType = typeof VARIANTS[keyof typeof VARIANTS];
+
+export type OnsetType = typeof ONSETS[number];
+
+export interface SelectOnsetProps extends Pick, "onChange"> {
+ variants: VariantsType;
+ currentOnset: string;
+ className?: HTMLElement["className"];
+}
diff --git a/src/core/components/Select/SelectOnset/SelectOnsetItem/SelectOnsetItem.stories.tsx b/src/core/components/Select/SelectOnset/SelectOnsetItem/SelectOnsetItem.stories.tsx
new file mode 100644
index 0000000..a11b68c
--- /dev/null
+++ b/src/core/components/Select/SelectOnset/SelectOnsetItem/SelectOnsetItem.stories.tsx
@@ -0,0 +1,31 @@
+import { Meta } from "@storybook/react";
+
+import { ONSETS } from "../SelectOnset/constants";
+import SelectOnsetItem from "./index";
+import { OnsetItemProps } from "./types";
+
+const meta = {
+ title: "core/Select/SelectOnset/SelectOnsetItem",
+ component: SelectOnsetItem,
+ argTypes: {
+ onset: {
+ control: "select",
+ options: ONSETS,
+ description: "onset",
+ },
+ },
+} satisfies Meta;
+
+export default meta;
+
+export const Default = (props: OnsetItemProps) => {
+ return (
+
+ );
+};
+
diff --git a/src/core/components/Select/SelectOnset/SelectOnsetItem/index.tsx b/src/core/components/Select/SelectOnset/SelectOnsetItem/index.tsx
new file mode 100644
index 0000000..1fc33ee
--- /dev/null
+++ b/src/core/components/Select/SelectOnset/SelectOnsetItem/index.tsx
@@ -0,0 +1,40 @@
+import { forwardRef, useId } from "react";
+
+import { Typography } from "@/index";
+import { OnsetItemProps } from "./types";
+
+const SelectOnsetItem = forwardRef((
+ {
+ onset,
+ ...props
+ }: OnsetItemProps,
+ ref: React.Ref,
+ ) => {
+ const id = useId();
+
+ return (
+
+
+
+ );
+});
+
+export default SelectOnsetItem;
+
+SelectOnsetItem.displayName = "SelectOnsetItem";
diff --git a/src/core/components/Select/SelectOnset/SelectOnsetItem/types/index.ts b/src/core/components/Select/SelectOnset/SelectOnsetItem/types/index.ts
new file mode 100644
index 0000000..59e63f8
--- /dev/null
+++ b/src/core/components/Select/SelectOnset/SelectOnsetItem/types/index.ts
@@ -0,0 +1,7 @@
+import { InputHTMLAttributes } from "react";
+
+import { OnsetType } from "../../SelectOnset/types";
+
+export interface OnsetItemProps extends InputHTMLAttributes{
+ onset: OnsetType
+}
diff --git a/src/core/components/Typography/Typography.stories.tsx b/src/core/components/Typography/Typography.stories.tsx
index b4e3cb2..e5b5ba4 100644
--- a/src/core/components/Typography/Typography.stories.tsx
+++ b/src/core/components/Typography/Typography.stories.tsx
@@ -1,8 +1,8 @@
+
import { ColorOptions } from "@/constants/color";
import { TypographyOptions } from "@/constants/typography";
import { Meta } from "@storybook/react";
-import Typography from "./index";
-import { TypographyProps } from "./types";
+import Typography, { TypographyProps } from "./index";
const meta = {
title: "core/Typography",
diff --git a/src/index.ts b/src/index.ts
index f8b59c2..3612ce4 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -3,6 +3,7 @@ export { default as BasicCalendar } from "@/core/components/Calendar/BasicCalend
export { default as DatePickerCalendar } from "@/core/components/Calendar/DatePickerCalendar";
export { default as ScheduleCalendar } from "@/core/components/Calendar/ScheduleCalendar";
export { default as Checkbox } from "@/core/components/Checkbox";
+export { default as Demo } from "@/core/components/Demo";
export { default as Divider } from "@/core/components/Divider";
export { default as Drawer } from "@/core/components/Drawer";
export { default as DropdownBase } from "@/core/components/Dropdown/DropdownBase";
@@ -31,6 +32,9 @@ export { default as ModalPopUp } from "@/core/components/Modal/ModalPopUp";
export { default as ModalPortal } from "@/core/components/Modal/ModalPortal";
export { default as Radio } from "@/core/components/Radio";
export { default as Section } from "@/core/components/Section";
+export { default as SelectBubble } from "@/core/components/Select/SelectBubble/SelectBubble";
+export { default as SelectBubbleItem } from "@/core/components/Select/SelectBubble/SelectBubbleItem";
+export { default as SelectOnset } from "@/core/components/Select/SelectOnset/SelectOnset";
export { default as GeneralTab } from "@/core/components/Tab/GeneralTab/GeneralTab";
export { default as GeneralTabItem } from "@/core/components/Tab/GeneralTab/GeneralTabItem";
export { default as TableTab } from "@/core/components/Tab/TableTab/TableTab";
diff --git a/src/styles/bbodek-theme.css b/src/styles/bbodek-theme.css
index c4dd9a7..741ad51 100644
--- a/src/styles/bbodek-theme.css
+++ b/src/styles/bbodek-theme.css
@@ -12,7 +12,7 @@
}
.bbodek-field {
- @apply flex-1 text-gray-08 placeholder:text-gray-05 disabled:text-gray-05 read-only:text-gray-05 bg-transparent outline-none;
+ @apply flex-1 text-gray-08 placeholder:text-gray-05 bg-white outline-none;
}
}
diff --git a/src/types/index.ts b/src/types/index.ts
index 9523896..81dd45d 100644
--- a/src/types/index.ts
+++ b/src/types/index.ts
@@ -1,5 +1,5 @@
export type ThemeColors =
- "white" | "black" | "gray-09" | "gray-08" |
+ "white" | "black" | "gray-08" |
"gray-07" | "gray-06" | "gray-05" |
"gray-04" | "gray-03" | "gray-02" |
"gray-01" | "gray-00" | "primary-06" |
diff --git a/tailwind.config.js b/tailwind.config.js
index a9af4f5..eb14286 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -10,7 +10,6 @@ export default {
colors: {
white: "#fff",
black: "#101828",
- "gray-09": "#F5F5F5",
"gray-08": "#1C273E",
"gray-07": "#333D52",
"gray-06": "#7C8497",