diff --git a/packages/jds/src/components/Checkbox/checkbox.css.ts b/packages/jds/src/components/Checkbox/checkbox.css.ts index 5997b3437..577443c19 100644 --- a/packages/jds/src/components/Checkbox/checkbox.css.ts +++ b/packages/jds/src/components/Checkbox/checkbox.css.ts @@ -229,6 +229,7 @@ export const checkboxItem = recipe({ export const checkboxLabel = style({ whiteSpace: "nowrap", + zIndex: 10, vars: { [labelColorVar]: vars.color.semantic.object.bolder }, selectors: { "[data-disabled] &": { vars: { [labelColorVar]: vars.color.semantic.object.subtle } }, diff --git a/packages/jds/src/components/Checkbox/checkbox.types.ts b/packages/jds/src/components/Checkbox/checkbox.types.ts index ef89df341..1369255b2 100644 --- a/packages/jds/src/components/Checkbox/checkbox.types.ts +++ b/packages/jds/src/components/Checkbox/checkbox.types.ts @@ -7,8 +7,6 @@ export type CheckboxSize = (typeof CHECKBOX_SIZE_OPTIONS)[number]; export type CheckboxVariant = (typeof CHECKBOX_VARIANT_OPTIONS)[number]; export type CheckedState = boolean | "indeterminate"; -// Checkbox.Root - type CheckboxRootControlledProps = { value: string[]; defaultValue?: never; @@ -33,18 +31,13 @@ type CheckboxRootBaseProps = { export type CheckboxRootProps = CheckboxRootBaseProps & (CheckboxRootControlledProps | CheckboxRootUncontrolledProps); -// Checkbox.Item - -export interface CheckboxItemProps extends ComponentPropsWithoutRef<"label"> { +export type CheckboxItemProps = ComponentPropsWithoutRef<"label"> & { size?: CheckboxSize; variant?: CheckboxVariant; disabled?: boolean; isInvalid?: boolean; children: ReactNode; -} - -// Checkbox.Basic -// Checkbox.Root 안에서 사용 시 value가 그룹 내 식별자가 되며 checked 상태는 그룹이 관리한다. +}; type CheckboxBasicControlledProps = { checked: CheckedState; @@ -60,7 +53,7 @@ type CheckboxBasicUncontrolledProps = { type CheckboxBasicBaseProps = Omit< ComponentPropsWithoutRef<"input">, - "size" | "checked" | "defaultChecked" | "onChange" + "size" | "checked" | "defaultChecked" | "onChange" | "type" > & { size?: CheckboxSize; value?: string; @@ -71,14 +64,10 @@ type CheckboxBasicBaseProps = Omit< export type CheckboxBasicProps = CheckboxBasicBaseProps & (CheckboxBasicControlledProps | CheckboxBasicUncontrolledProps); -// Checkbox.Label - -export interface CheckboxLabelProps { +export type CheckboxLabelProps = { children: ReactNode; -} - -// Checkbox.Helper +}; -export interface CheckboxHelperProps { +export type CheckboxHelperProps = { children: ReactNode; -} +}; diff --git a/packages/jds/src/components/Radio/radio.types.ts b/packages/jds/src/components/Radio/radio.types.ts index b45a88ddc..e97482303 100644 --- a/packages/jds/src/components/Radio/radio.types.ts +++ b/packages/jds/src/components/Radio/radio.types.ts @@ -29,23 +29,25 @@ type RadioRootBaseProps = { export type RadioRootProps = RadioRootBaseProps & (RadioRootControlledProps | RadioRootUncontrolledProps); -export interface RadioBasicProps - extends Omit, "value" | "size"> { +export type RadioBasicProps = Omit< + ComponentPropsWithoutRef<"input">, + "value" | "size" | "type" +> & { size?: RadioSize; value: string; -} +}; -export interface RadioItemProps extends ComponentPropsWithoutRef<"label"> { +export type RadioItemProps = ComponentPropsWithoutRef<"label"> & { size?: RadioSize; variant?: RadioVariant; disabled?: boolean; children: ReactNode; -} +}; -export interface RadioLabelProps { +export type RadioLabelProps = { children: ReactNode; -} +}; -export interface RadioHelperProps { +export type RadioHelperProps = { children: ReactNode; -} +};