@exem-ui/react 0.3.4-next.20260903042316 → 0.3.4-next.20260908085941

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.
@@ -390,4 +390,4 @@ declare namespace ConditionalTooltip {
390
390
  var displayName: string;
391
391
  }
392
392
 
393
- export { type TooltipDescriptionProps as A, type TooltipProviderProps as B, type ColorPaletteColor as C, type TooltipRootProps as D, type TooltipTitleProps as E, type TooltipTriggerProps as F, type ColorPaletteProps as G, type ColorPaletteSwatchProps as H, type Icon as I, ColorPalette as J, ColorPaletteColors as K, DEFAULT_COLOR as L, getColorPaletteColor as M, isInPalette as N, type ConditionalTooltipProps as O, type FlatTooltipProps as P, type TooltipConfig as Q, FlatTooltip as R, type Size as S, Tabs as T, type Variant as V, ConditionalTooltip as a, type TabsComponent as b, type TabsContentProps as c, type TabsListProps as d, type TabsRootProps as e, type TabsTriggerProps as f, Select as g, type SelectBoxProps as h, type SelectComponent as i, type SelectDescriptionProps as j, type SelectEmptyProps as k, type SelectGroupProps as l, type SelectItemProps as m, type SelectLabelProps as n, type SelectListProps as o, type SelectRootProps as p, type SelectTriggerProps as q, Segment as r, type SegmentComponent as s, type SegmentContentProps as t, type SegmentItemProps as u, type SegmentListProps as v, type SegmentRootProps as w, Tooltip as x, type TooltipComponent as y, type TooltipContentProps as z };
393
+ export { type TooltipDescriptionProps as A, type TooltipProviderProps as B, type ColorPaletteColor as C, type TooltipRootProps as D, type TooltipTitleProps as E, type TooltipTriggerProps as F, type ColorPaletteProps as G, type ColorPaletteSwatchProps as H, type Icon as I, ColorPalette as J, ColorPaletteColors as K, DEFAULT_COLOR as L, getColorPaletteColor as M, isInPalette as N, type FlatTooltipProps as O, type TooltipConfig as P, ConditionalTooltip as Q, FlatTooltip as R, type Size as S, Tabs as T, type Variant as V, type ConditionalTooltipProps as a, type TabsComponent as b, type TabsContentProps as c, type TabsListProps as d, type TabsRootProps as e, type TabsTriggerProps as f, Select as g, type SelectBoxProps as h, type SelectComponent as i, type SelectDescriptionProps as j, type SelectEmptyProps as k, type SelectGroupProps as l, type SelectItemProps as m, type SelectLabelProps as n, type SelectListProps as o, type SelectRootProps as p, type SelectTriggerProps as q, Segment as r, type SegmentComponent as s, type SegmentContentProps as t, type SegmentItemProps as u, type SegmentListProps as v, type SegmentRootProps as w, Tooltip as x, type TooltipComponent as y, type TooltipContentProps as z };
@@ -390,4 +390,4 @@ declare namespace ConditionalTooltip {
390
390
  var displayName: string;
391
391
  }
392
392
 
393
- export { type TooltipDescriptionProps as A, type TooltipProviderProps as B, type ColorPaletteColor as C, type TooltipRootProps as D, type TooltipTitleProps as E, type TooltipTriggerProps as F, type ColorPaletteProps as G, type ColorPaletteSwatchProps as H, type Icon as I, ColorPalette as J, ColorPaletteColors as K, DEFAULT_COLOR as L, getColorPaletteColor as M, isInPalette as N, type ConditionalTooltipProps as O, type FlatTooltipProps as P, type TooltipConfig as Q, FlatTooltip as R, type Size as S, Tabs as T, type Variant as V, ConditionalTooltip as a, type TabsComponent as b, type TabsContentProps as c, type TabsListProps as d, type TabsRootProps as e, type TabsTriggerProps as f, Select as g, type SelectBoxProps as h, type SelectComponent as i, type SelectDescriptionProps as j, type SelectEmptyProps as k, type SelectGroupProps as l, type SelectItemProps as m, type SelectLabelProps as n, type SelectListProps as o, type SelectRootProps as p, type SelectTriggerProps as q, Segment as r, type SegmentComponent as s, type SegmentContentProps as t, type SegmentItemProps as u, type SegmentListProps as v, type SegmentRootProps as w, Tooltip as x, type TooltipComponent as y, type TooltipContentProps as z };
393
+ export { type TooltipDescriptionProps as A, type TooltipProviderProps as B, type ColorPaletteColor as C, type TooltipRootProps as D, type TooltipTitleProps as E, type TooltipTriggerProps as F, type ColorPaletteProps as G, type ColorPaletteSwatchProps as H, type Icon as I, ColorPalette as J, ColorPaletteColors as K, DEFAULT_COLOR as L, getColorPaletteColor as M, isInPalette as N, type FlatTooltipProps as O, type TooltipConfig as P, ConditionalTooltip as Q, FlatTooltip as R, type Size as S, Tabs as T, type Variant as V, type ConditionalTooltipProps as a, type TabsComponent as b, type TabsContentProps as c, type TabsListProps as d, type TabsRootProps as e, type TabsTriggerProps as f, Select as g, type SelectBoxProps as h, type SelectComponent as i, type SelectDescriptionProps as j, type SelectEmptyProps as k, type SelectGroupProps as l, type SelectItemProps as m, type SelectLabelProps as n, type SelectListProps as o, type SelectRootProps as p, type SelectTriggerProps as q, Segment as r, type SegmentComponent as s, type SegmentContentProps as t, type SegmentItemProps as u, type SegmentListProps as v, type SegmentRootProps as w, Tooltip as x, type TooltipComponent as y, type TooltipContentProps as z };
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as ColorPaletteColor, G as ColorPaletteProps, I as Icon, S as Size, V as Variant, u as SegmentItemProps, w as SegmentRootProps, g as Select, f as TabsTriggerProps, e as TabsRootProps } from '../FlatTooltip-DqHMNx-V.mjs';
3
- export { a as ConditionalTooltip, O as ConditionalTooltipProps, R as FlatTooltip, P as FlatTooltipProps, Q as TooltipConfig } from '../FlatTooltip-DqHMNx-V.mjs';
2
+ import { C as ColorPaletteColor, G as ColorPaletteProps, I as Icon, S as Size, V as Variant, u as SegmentItemProps, w as SegmentRootProps, g as Select, f as TabsTriggerProps, e as TabsRootProps } from '../FlatTooltip-CQYzMWkr.mjs';
3
+ export { Q as ConditionalTooltip, a as ConditionalTooltipProps, R as FlatTooltip, O as FlatTooltipProps, P as TooltipConfig } from '../FlatTooltip-CQYzMWkr.mjs';
4
4
  import { ReactNode, ComponentProps } from 'react';
5
5
  import '@radix-ui/react-tabs';
6
6
  import '@radix-ui/react-radio-group';
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as ColorPaletteColor, G as ColorPaletteProps, I as Icon, S as Size, V as Variant, u as SegmentItemProps, w as SegmentRootProps, g as Select, f as TabsTriggerProps, e as TabsRootProps } from '../FlatTooltip-DqHMNx-V.js';
3
- export { a as ConditionalTooltip, O as ConditionalTooltipProps, R as FlatTooltip, P as FlatTooltipProps, Q as TooltipConfig } from '../FlatTooltip-DqHMNx-V.js';
2
+ import { C as ColorPaletteColor, G as ColorPaletteProps, I as Icon, S as Size, V as Variant, u as SegmentItemProps, w as SegmentRootProps, g as Select, f as TabsTriggerProps, e as TabsRootProps } from '../FlatTooltip-CQYzMWkr.js';
3
+ export { Q as ConditionalTooltip, a as ConditionalTooltipProps, R as FlatTooltip, O as FlatTooltipProps, P as TooltipConfig } from '../FlatTooltip-CQYzMWkr.js';
4
4
  import { ReactNode, ComponentProps } from 'react';
5
5
  import '@radix-ui/react-tabs';
6
6
  import '@radix-ui/react-radio-group';
package/dist/index.d.mts CHANGED
@@ -2,13 +2,14 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
2
2
  import { VariantProps } from '@exem-ui/core/utils';
3
3
  import * as React$1 from 'react';
4
4
  import React__default, { ComponentProps } from 'react';
5
- import { C as ColorPaletteColor, a as ConditionalTooltip, S as Size$1, I as Icon, V as Variant } from './FlatTooltip-DqHMNx-V.mjs';
6
- export { J as ColorPalette, K as ColorPaletteColors, G as ColorPaletteProps, H as ColorPaletteSwatchProps, L as DEFAULT_COLOR, r as Segment, s as SegmentComponent, t as SegmentContentProps, u as SegmentItemProps, v as SegmentListProps, w as SegmentRootProps, g as Select, h as SelectBoxProps, i as SelectComponent, j as SelectDescriptionProps, k as SelectEmptyProps, l as SelectGroupProps, m as SelectItemProps, n as SelectLabelProps, o as SelectListProps, p as SelectRootProps, q as SelectTriggerProps, T as Tabs, b as TabsComponent, c as TabsContentProps, d as TabsListProps, e as TabsRootProps, f as TabsTriggerProps, x as Tooltip, y as TooltipComponent, z as TooltipContentProps, A as TooltipDescriptionProps, B as TooltipProviderProps, D as TooltipRootProps, E as TooltipTitleProps, F as TooltipTriggerProps, M as getColorPaletteColor, N as isInPalette } from './FlatTooltip-DqHMNx-V.mjs';
5
+ import { C as ColorPaletteColor, a as ConditionalTooltipProps, S as Size$1, I as Icon, V as Variant } from './FlatTooltip-CQYzMWkr.mjs';
6
+ export { J as ColorPalette, K as ColorPaletteColors, G as ColorPaletteProps, H as ColorPaletteSwatchProps, L as DEFAULT_COLOR, r as Segment, s as SegmentComponent, t as SegmentContentProps, u as SegmentItemProps, v as SegmentListProps, w as SegmentRootProps, g as Select, h as SelectBoxProps, i as SelectComponent, j as SelectDescriptionProps, k as SelectEmptyProps, l as SelectGroupProps, m as SelectItemProps, n as SelectLabelProps, o as SelectListProps, p as SelectRootProps, q as SelectTriggerProps, T as Tabs, b as TabsComponent, c as TabsContentProps, d as TabsListProps, e as TabsRootProps, f as TabsTriggerProps, x as Tooltip, y as TooltipComponent, z as TooltipContentProps, A as TooltipDescriptionProps, B as TooltipProviderProps, D as TooltipRootProps, E as TooltipTitleProps, F as TooltipTriggerProps, M as getColorPaletteColor, N as isInPalette } from './FlatTooltip-CQYzMWkr.mjs';
7
+ import * as react_jsx_runtime from 'react/jsx-runtime';
8
+ import { Button as Button$1 } from '@base-ui/react/button';
7
9
  import { I as IconBaseProps } from './types-xnO0gkCW.mjs';
8
10
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
9
11
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
10
12
  import * as SwitchPrimitives from '@radix-ui/react-switch';
11
- import * as react_jsx_runtime from 'react/jsx-runtime';
12
13
  import { DayPicker } from 'react-day-picker';
13
14
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
14
15
  import { Combobox as Combobox$1 } from '@base-ui/react/combobox';
@@ -226,18 +227,15 @@ type ButtonVariantProps = {
226
227
  color?: ButtonColor;
227
228
  background?: ButtonBackground;
228
229
  };
229
- type ButtonProps = React__default.ButtonHTMLAttributes<HTMLButtonElement> & Omit<VariantProps<typeof buttonVariants>, 'variant' | 'color' | 'background'> & ButtonVariantProps & {
230
+
231
+ type ButtonProps = Button$1.Props & ButtonVariantProps & {
230
232
  size?: ButtonSize;
231
233
  icon?: React__default.ReactElement<IconBaseProps>;
232
234
  };
233
- type ButtonComponent = React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
234
- declare const buttonVariants: (props?: ({
235
- background?: "fill" | "none" | null | undefined;
236
- color?: "accent" | "primary" | "critical" | null | undefined;
237
- size?: "small" | "xsmall" | "medium" | "large" | "xlarge" | null | undefined;
238
- variant?: "solid" | "assistive" | "outlined" | "invisible" | null | undefined;
239
- } & class_variance_authority_types.ClassProp) | undefined) => string;
240
- declare const Button: ButtonComponent;
235
+ /** @see https://base-ui.com/react/components/button */
236
+ declare function Button({ className, variant, color, background, size, icon, children, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
237
+ /** @deprecated 컴포넌트 타입은 `typeof Button`으로 바로 얻을 수 있어 이 별칭은 불필요합니다. */
238
+ type ButtonComponent = typeof Button;
241
239
 
242
240
  /** 색 이름 → Tailwind 토큰 class 매핑(배경/텍스트). 컴포넌트 내부 및 소비자용. */
243
241
  declare const colorPaletteColorClasses: Record<ColorPaletteColor, {
@@ -245,16 +243,15 @@ declare const colorPaletteColorClasses: Record<ColorPaletteColor, {
245
243
  text: string;
246
244
  }>;
247
245
 
248
- type ButtonGroupSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
249
246
  interface ButtonGroupItem {
250
247
  id: string;
251
248
  label?: string;
252
249
  icon?: React__default.ReactElement<IconBaseProps>;
253
250
  /** 툴팁 설정 (문자열 또는 FlatTooltip 설정 객체) */
254
- tooltip?: ComponentProps<typeof ConditionalTooltip>['tooltip'];
251
+ tooltip?: ConditionalTooltipProps['tooltip'];
255
252
  onClick?: () => void;
256
253
  }
257
- interface ButtonGroupProps {
254
+ type ButtonGroupProps = Pick<React__default.ComponentProps<'div'>, 'aria-label' | 'aria-labelledby' | 'className' | 'ref'> & {
258
255
  /** 버튼 그룹 스타일 변형 */
259
256
  variant?: 'contained' | 'outlined';
260
257
  /** 아이콘만 표시 */
@@ -262,23 +259,23 @@ interface ButtonGroupProps {
262
259
  /** 배경색 표시 여부 (뒷 레이어가 보이지 않아야 할 때) */
263
260
  hasBackground?: boolean;
264
261
  /** 버튼 크기 */
265
- size?: ButtonGroupSize;
262
+ size?: ButtonSize;
266
263
  /** 버튼 항목 목록 */
267
264
  items: ButtonGroupItem[];
268
- /** 커스텀 className */
269
- className?: string;
270
- }
271
- type ButtonGroupComponent = React__default.ForwardRefExoticComponent<ButtonGroupProps & React__default.RefAttributes<HTMLDivElement>>;
272
- declare const ButtonGroup: ButtonGroupComponent;
265
+ };
266
+ declare function ButtonGroup({ variant, iconOnly, hasBackground, size, items, className, ...props }: ButtonGroupProps): react_jsx_runtime.JSX.Element | null;
267
+ /** @deprecated 컴포넌트 타입은 `typeof ButtonGroup`으로 바로 얻을 수 있어 이 별칭은 불필요합니다. */
268
+ type ButtonGroupComponent = typeof ButtonGroup;
273
269
 
274
- type IconButtonProps = Omit<React__default.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> & ButtonVariantProps & {
270
+ type IconButtonProps = ButtonProps & {
271
+ children?: never;
275
272
  icon: React__default.ReactElement<IconBaseProps>;
276
- size?: ButtonSize;
277
273
  /** 툴팁 설정 (문자열 또는 FlatTooltip 설정 객체) */
278
- tooltip?: ComponentProps<typeof ConditionalTooltip>['tooltip'];
274
+ tooltip?: ConditionalTooltipProps['tooltip'];
279
275
  };
280
- type IconButtonComponent = React__default.ForwardRefExoticComponent<IconButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
281
- declare const IconButton: IconButtonComponent;
276
+ declare function IconButton({ className, tooltip, icon, size, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...props }: IconButtonProps): react_jsx_runtime.JSX.Element;
277
+ /** @deprecated 컴포넌트 타입은 `typeof IconButton`으로 바로 얻을 수 있어 이 별칭은 불필요합니다. */
278
+ type IconButtonComponent = typeof IconButton;
282
279
 
283
280
  type CheckboxSize = 'small' | 'medium' | 'large';
284
281
  type LabelPosition = 'left' | 'right';
package/dist/index.d.ts CHANGED
@@ -2,13 +2,14 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
2
2
  import { VariantProps } from '@exem-ui/core/utils';
3
3
  import * as React$1 from 'react';
4
4
  import React__default, { ComponentProps } from 'react';
5
- import { C as ColorPaletteColor, a as ConditionalTooltip, S as Size$1, I as Icon, V as Variant } from './FlatTooltip-DqHMNx-V.js';
6
- export { J as ColorPalette, K as ColorPaletteColors, G as ColorPaletteProps, H as ColorPaletteSwatchProps, L as DEFAULT_COLOR, r as Segment, s as SegmentComponent, t as SegmentContentProps, u as SegmentItemProps, v as SegmentListProps, w as SegmentRootProps, g as Select, h as SelectBoxProps, i as SelectComponent, j as SelectDescriptionProps, k as SelectEmptyProps, l as SelectGroupProps, m as SelectItemProps, n as SelectLabelProps, o as SelectListProps, p as SelectRootProps, q as SelectTriggerProps, T as Tabs, b as TabsComponent, c as TabsContentProps, d as TabsListProps, e as TabsRootProps, f as TabsTriggerProps, x as Tooltip, y as TooltipComponent, z as TooltipContentProps, A as TooltipDescriptionProps, B as TooltipProviderProps, D as TooltipRootProps, E as TooltipTitleProps, F as TooltipTriggerProps, M as getColorPaletteColor, N as isInPalette } from './FlatTooltip-DqHMNx-V.js';
5
+ import { C as ColorPaletteColor, a as ConditionalTooltipProps, S as Size$1, I as Icon, V as Variant } from './FlatTooltip-CQYzMWkr.js';
6
+ export { J as ColorPalette, K as ColorPaletteColors, G as ColorPaletteProps, H as ColorPaletteSwatchProps, L as DEFAULT_COLOR, r as Segment, s as SegmentComponent, t as SegmentContentProps, u as SegmentItemProps, v as SegmentListProps, w as SegmentRootProps, g as Select, h as SelectBoxProps, i as SelectComponent, j as SelectDescriptionProps, k as SelectEmptyProps, l as SelectGroupProps, m as SelectItemProps, n as SelectLabelProps, o as SelectListProps, p as SelectRootProps, q as SelectTriggerProps, T as Tabs, b as TabsComponent, c as TabsContentProps, d as TabsListProps, e as TabsRootProps, f as TabsTriggerProps, x as Tooltip, y as TooltipComponent, z as TooltipContentProps, A as TooltipDescriptionProps, B as TooltipProviderProps, D as TooltipRootProps, E as TooltipTitleProps, F as TooltipTriggerProps, M as getColorPaletteColor, N as isInPalette } from './FlatTooltip-CQYzMWkr.js';
7
+ import * as react_jsx_runtime from 'react/jsx-runtime';
8
+ import { Button as Button$1 } from '@base-ui/react/button';
7
9
  import { I as IconBaseProps } from './types-xnO0gkCW.js';
8
10
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
9
11
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
10
12
  import * as SwitchPrimitives from '@radix-ui/react-switch';
11
- import * as react_jsx_runtime from 'react/jsx-runtime';
12
13
  import { DayPicker } from 'react-day-picker';
13
14
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
14
15
  import { Combobox as Combobox$1 } from '@base-ui/react/combobox';
@@ -226,18 +227,15 @@ type ButtonVariantProps = {
226
227
  color?: ButtonColor;
227
228
  background?: ButtonBackground;
228
229
  };
229
- type ButtonProps = React__default.ButtonHTMLAttributes<HTMLButtonElement> & Omit<VariantProps<typeof buttonVariants>, 'variant' | 'color' | 'background'> & ButtonVariantProps & {
230
+
231
+ type ButtonProps = Button$1.Props & ButtonVariantProps & {
230
232
  size?: ButtonSize;
231
233
  icon?: React__default.ReactElement<IconBaseProps>;
232
234
  };
233
- type ButtonComponent = React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
234
- declare const buttonVariants: (props?: ({
235
- background?: "fill" | "none" | null | undefined;
236
- color?: "accent" | "primary" | "critical" | null | undefined;
237
- size?: "small" | "xsmall" | "medium" | "large" | "xlarge" | null | undefined;
238
- variant?: "solid" | "assistive" | "outlined" | "invisible" | null | undefined;
239
- } & class_variance_authority_types.ClassProp) | undefined) => string;
240
- declare const Button: ButtonComponent;
235
+ /** @see https://base-ui.com/react/components/button */
236
+ declare function Button({ className, variant, color, background, size, icon, children, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
237
+ /** @deprecated 컴포넌트 타입은 `typeof Button`으로 바로 얻을 수 있어 이 별칭은 불필요합니다. */
238
+ type ButtonComponent = typeof Button;
241
239
 
242
240
  /** 색 이름 → Tailwind 토큰 class 매핑(배경/텍스트). 컴포넌트 내부 및 소비자용. */
243
241
  declare const colorPaletteColorClasses: Record<ColorPaletteColor, {
@@ -245,16 +243,15 @@ declare const colorPaletteColorClasses: Record<ColorPaletteColor, {
245
243
  text: string;
246
244
  }>;
247
245
 
248
- type ButtonGroupSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
249
246
  interface ButtonGroupItem {
250
247
  id: string;
251
248
  label?: string;
252
249
  icon?: React__default.ReactElement<IconBaseProps>;
253
250
  /** 툴팁 설정 (문자열 또는 FlatTooltip 설정 객체) */
254
- tooltip?: ComponentProps<typeof ConditionalTooltip>['tooltip'];
251
+ tooltip?: ConditionalTooltipProps['tooltip'];
255
252
  onClick?: () => void;
256
253
  }
257
- interface ButtonGroupProps {
254
+ type ButtonGroupProps = Pick<React__default.ComponentProps<'div'>, 'aria-label' | 'aria-labelledby' | 'className' | 'ref'> & {
258
255
  /** 버튼 그룹 스타일 변형 */
259
256
  variant?: 'contained' | 'outlined';
260
257
  /** 아이콘만 표시 */
@@ -262,23 +259,23 @@ interface ButtonGroupProps {
262
259
  /** 배경색 표시 여부 (뒷 레이어가 보이지 않아야 할 때) */
263
260
  hasBackground?: boolean;
264
261
  /** 버튼 크기 */
265
- size?: ButtonGroupSize;
262
+ size?: ButtonSize;
266
263
  /** 버튼 항목 목록 */
267
264
  items: ButtonGroupItem[];
268
- /** 커스텀 className */
269
- className?: string;
270
- }
271
- type ButtonGroupComponent = React__default.ForwardRefExoticComponent<ButtonGroupProps & React__default.RefAttributes<HTMLDivElement>>;
272
- declare const ButtonGroup: ButtonGroupComponent;
265
+ };
266
+ declare function ButtonGroup({ variant, iconOnly, hasBackground, size, items, className, ...props }: ButtonGroupProps): react_jsx_runtime.JSX.Element | null;
267
+ /** @deprecated 컴포넌트 타입은 `typeof ButtonGroup`으로 바로 얻을 수 있어 이 별칭은 불필요합니다. */
268
+ type ButtonGroupComponent = typeof ButtonGroup;
273
269
 
274
- type IconButtonProps = Omit<React__default.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> & ButtonVariantProps & {
270
+ type IconButtonProps = ButtonProps & {
271
+ children?: never;
275
272
  icon: React__default.ReactElement<IconBaseProps>;
276
- size?: ButtonSize;
277
273
  /** 툴팁 설정 (문자열 또는 FlatTooltip 설정 객체) */
278
- tooltip?: ComponentProps<typeof ConditionalTooltip>['tooltip'];
274
+ tooltip?: ConditionalTooltipProps['tooltip'];
279
275
  };
280
- type IconButtonComponent = React__default.ForwardRefExoticComponent<IconButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
281
- declare const IconButton: IconButtonComponent;
276
+ declare function IconButton({ className, tooltip, icon, size, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...props }: IconButtonProps): react_jsx_runtime.JSX.Element;
277
+ /** @deprecated 컴포넌트 타입은 `typeof IconButton`으로 바로 얻을 수 있어 이 별칭은 불필요합니다. */
278
+ type IconButtonComponent = typeof IconButton;
282
279
 
283
280
  type CheckboxSize = 'small' | 'medium' | 'large';
284
281
  type LabelPosition = 'left' | 'right';
package/dist/index.js CHANGED
@@ -6,6 +6,7 @@ var utils = require('@exem-ui/core/utils');
6
6
  var React = require('react');
7
7
  var jsxRuntime = require('react/jsx-runtime');
8
8
  var reactSlot = require('@radix-ui/react-slot');
9
+ var button = require('@base-ui/react/button');
9
10
  var CheckboxPrimitive = require('@radix-ui/react-checkbox');
10
11
  var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
11
12
  var SwitchPrimitives = require('@radix-ui/react-switch');
@@ -429,185 +430,114 @@ Breadcrumb.Ellipsis.displayName = "Breadcrumb.Ellipsis";
429
430
  var colorStyles = {
430
431
  primary: {
431
432
  solid: {
432
- button: "bg-solid-primary-default hover:bg-solid-primary-hovered disabled:bg-solid-primary-disabled",
433
- icon: "text-icon-inverse group-disabled/button:text-icon-inverse",
434
- text: "text-text-inverse group-disabled/button:text-text-inverse"
433
+ root: "bg-solid-primary-default text-text-inverse hover:bg-solid-primary-hovered data-[disabled]:bg-solid-primary-disabled data-[disabled]:text-text-inverse",
434
+ icon: "text-icon-inverse group-data-[disabled]/button:text-icon-inverse"
435
435
  },
436
436
  assistive: {
437
- button: "bg-elevation-elevation-2 hover:bg-elevation-elevation-3 disabled:bg-elevation-elevation-2",
438
- icon: "text-icon-secondary group-disabled/button:text-icon-disabled",
439
- text: "text-text-secondary group-disabled/button:text-text-disabled"
437
+ root: "bg-elevation-elevation-2 text-text-secondary hover:bg-elevation-elevation-3 data-[disabled]:bg-elevation-elevation-2 data-[disabled]:text-text-disabled",
438
+ icon: "text-icon-secondary group-data-[disabled]/button:text-icon-disabled"
440
439
  },
441
440
  outlined: {
442
- button: "border border-border-primary disabled:border-border-primary hover:bg-elevation-elevation-2",
443
- icon: "text-icon-secondary group-disabled/button:text-icon-disabled",
444
- text: "text-text-secondary group-disabled/button:text-text-disabled"
441
+ root: "border border-border-primary text-text-secondary hover:bg-elevation-elevation-2 data-[disabled]:border-border-primary data-[disabled]:text-text-disabled",
442
+ icon: "text-icon-secondary group-data-[disabled]/button:text-icon-disabled"
445
443
  },
446
444
  invisible: {
447
- button: "hover:bg-elevation-elevation-2",
448
- icon: "text-icon-secondary group-disabled/button:text-icon-disabled",
449
- text: "text-text-secondary group-disabled/button:text-text-disabled"
445
+ root: "text-text-secondary hover:bg-elevation-elevation-2 data-[disabled]:text-text-disabled",
446
+ icon: "text-icon-secondary group-data-[disabled]/button:text-icon-disabled"
450
447
  }
451
448
  },
452
449
  accent: {
453
450
  solid: {
454
- button: "bg-solid-accent-default hover:bg-solid-accent-hovered disabled:bg-solid-accent-disabled",
455
- icon: "text-icon-static-light group-disabled/button:text-icon-inverse-disabled",
456
- text: "text-text-static-light group-disabled/button:text-text-inverse-disabled"
451
+ root: "bg-solid-accent-default text-text-static-light hover:bg-solid-accent-hovered data-[disabled]:bg-solid-accent-disabled data-[disabled]:text-text-inverse-disabled",
452
+ icon: "text-icon-static-light group-data-[disabled]/button:text-icon-inverse-disabled"
457
453
  },
458
454
  assistive: {
459
- button: "bg-elevation-accent-0 hover:bg-elevation-accent-1 disabled:bg-elevation-accent-0",
460
- icon: "text-text-accent group-disabled/button:text-text-accent-disabled",
461
- text: "text-text-accent group-disabled/button:text-text-accent-disabled"
455
+ root: "bg-elevation-accent-0 text-text-accent hover:bg-elevation-accent-1 data-[disabled]:bg-elevation-accent-0 data-[disabled]:text-text-accent-disabled",
456
+ icon: "text-text-accent group-data-[disabled]/button:text-text-accent-disabled"
462
457
  },
463
458
  outlined: {
464
- button: "border border-border-primary disabled:border-border-primary hover:bg-elevation-accent-0",
465
- icon: "text-text-accent group-disabled/button:text-text-accent-disabled",
466
- text: "text-text-accent group-disabled/button:text-text-accent-disabled"
459
+ root: "border border-border-primary text-text-accent hover:bg-elevation-accent-0 data-[disabled]:border-border-primary data-[disabled]:text-text-accent-disabled",
460
+ icon: "text-text-accent group-data-[disabled]/button:text-text-accent-disabled"
467
461
  },
468
462
  invisible: {
469
- button: "hover:bg-elevation-accent-0",
470
- icon: "text-text-accent group-disabled/button:text-text-accent-disabled",
471
- text: "text-text-accent group-disabled/button:text-text-accent-disabled"
463
+ root: "text-text-accent hover:bg-elevation-accent-0 data-[disabled]:text-text-accent-disabled",
464
+ icon: "text-text-accent group-data-[disabled]/button:text-text-accent-disabled"
472
465
  }
473
466
  },
474
467
  critical: {
475
468
  solid: {
476
- button: "bg-solid-critical-default hover:bg-solid-critical-hovered disabled:bg-solid-critical-disabled",
477
- icon: "text-icon-static-light group-disabled/button:text-icon-inverse-disabled",
478
- text: "text-text-static-light group-disabled/button:text-text-inverse-disabled"
469
+ root: "bg-solid-critical-default text-text-static-light hover:bg-solid-critical-hovered data-[disabled]:bg-solid-critical-disabled data-[disabled]:text-text-inverse-disabled",
470
+ icon: "text-icon-static-light group-data-[disabled]/button:text-icon-inverse-disabled"
479
471
  },
480
472
  assistive: {
481
- button: "bg-elevation-critical-0 hover:bg-elevation-critical-1 disabled:bg-elevation-critical-0",
482
- icon: "text-text-critical group-disabled/button:text-text-critical-disabled",
483
- text: "text-text-critical group-disabled/button:text-text-critical-disabled"
473
+ root: "bg-elevation-critical-0 text-text-critical hover:bg-elevation-critical-1 data-[disabled]:bg-elevation-critical-0 data-[disabled]:text-text-critical-disabled",
474
+ icon: "text-text-critical group-data-[disabled]/button:text-text-critical-disabled"
484
475
  },
485
476
  outlined: {
486
- button: "border border-border-primary disabled:border-border-primary hover:bg-elevation-critical-0",
487
- icon: "text-text-critical group-disabled/button:text-text-critical-disabled",
488
- text: "text-text-critical group-disabled/button:text-text-critical-disabled"
477
+ root: "border border-border-primary text-text-critical hover:bg-elevation-critical-0 data-[disabled]:border-border-primary data-[disabled]:text-text-critical-disabled",
478
+ icon: "text-text-critical group-data-[disabled]/button:text-text-critical-disabled"
489
479
  },
490
480
  invisible: {
491
- button: "hover:bg-elevation-critical-0",
492
- icon: "text-text-critical group-disabled/button:text-text-critical-disabled",
493
- text: "text-text-critical group-disabled/button:text-text-critical-disabled"
481
+ root: "text-text-critical hover:bg-elevation-critical-0 data-[disabled]:text-text-critical-disabled",
482
+ icon: "text-text-critical group-data-[disabled]/button:text-text-critical-disabled"
494
483
  }
495
484
  }
496
485
  };
497
486
  var buttonVariants = utils.cva(
498
- "inline-flex w-fit shrink-0 cursor-pointer flex-row items-center justify-center rounded-medium transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:cursor-not-allowed",
487
+ "inline-flex w-fit shrink-0 cursor-pointer flex-row items-center justify-center rounded-medium transition-colors focus-visible:outline-none data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed",
499
488
  {
500
- compoundVariants: [
501
- // Primary 색상 조합
502
- { className: colorStyles.primary.solid.button, color: "primary", variant: "solid" },
503
- { className: colorStyles.primary.assistive.button, color: "primary", variant: "assistive" },
504
- { className: colorStyles.primary.outlined.button, color: "primary", variant: "outlined" },
505
- { className: colorStyles.primary.invisible.button, color: "primary", variant: "invisible" },
506
- // Accent 색상 조합
507
- { className: colorStyles.accent.solid.button, color: "accent", variant: "solid" },
508
- { className: colorStyles.accent.assistive.button, color: "accent", variant: "assistive" },
509
- { className: colorStyles.accent.outlined.button, color: "accent", variant: "outlined" },
510
- { className: colorStyles.accent.invisible.button, color: "accent", variant: "invisible" },
511
- // Critical 색상 조합
512
- { className: colorStyles.critical.solid.button, color: "critical", variant: "solid" },
513
- { className: colorStyles.critical.assistive.button, color: "critical", variant: "assistive" },
514
- { className: colorStyles.critical.outlined.button, color: "critical", variant: "outlined" },
515
- { className: colorStyles.critical.invisible.button, color: "critical", variant: "invisible" },
516
- // background 표면은 outlined/invisible 에서만 추가
517
- {
518
- className: "bg-elevation-elevation-0",
519
- background: "fill",
520
- variant: ["outlined", "invisible"]
521
- }
522
- ],
523
489
  defaultVariants: {
524
- background: "none",
525
- color: "primary",
526
- size: "medium",
527
- variant: "solid"
490
+ size: "medium"
528
491
  },
529
492
  variants: {
530
- background: {
531
- none: "",
532
- fill: ""
533
- },
534
- color: {
535
- accent: "",
536
- critical: "",
537
- primary: ""
538
- },
539
493
  size: {
540
494
  xsmall: "h-6 gap-0 px-1 text-body-3 font-medium",
541
495
  small: "h-7 gap-0.5 px-1.5 text-body-2 font-medium",
542
496
  medium: "h-8 gap-0.5 px-2 text-body-2 font-medium",
543
497
  large: "h-10 gap-1 px-2.5 text-body-1 font-medium",
544
498
  xlarge: "h-12 gap-1 px-3 text-title-2 font-medium"
545
- },
546
- variant: {
547
- solid: "",
548
- assistive: "",
549
- outlined: "",
550
- invisible: ""
551
499
  }
552
500
  }
553
501
  }
554
502
  );
555
- var IconSizeMap = {
503
+ var iconSizeMap = {
556
504
  xsmall: chunk6MFMQCL5_js.iconSizes.sm,
557
505
  small: chunk6MFMQCL5_js.iconSizes.sm,
558
506
  medium: chunk6MFMQCL5_js.iconSizes.sm,
559
507
  large: chunk6MFMQCL5_js.iconSizes.md,
560
508
  xlarge: chunk6MFMQCL5_js.iconSizes.lg
561
509
  };
562
- var Button = React.forwardRef(
563
- ({
564
- className,
565
- variant = "solid",
566
- color = "primary",
567
- background,
568
- size = "medium",
569
- icon,
570
- children,
571
- ...props
572
- }, ref) => {
573
- const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
574
- icon && React.cloneElement(icon, {
575
- className: utils.cn("shrink-0", colorStyles[color][variant].icon, icon.props.className),
576
- size: icon.props.size ?? IconSizeMap[size]
577
- }),
578
- children != null && /* @__PURE__ */ jsxRuntime.jsx(
579
- "span",
580
- {
581
- className: utils.cn(
582
- "min-w-0 truncate",
583
- size === "xlarge" ? "px-1" : "px-0.5",
584
- colorStyles[color][variant].text
585
- ),
586
- children
587
- }
588
- )
589
- ] });
590
- return /* @__PURE__ */ jsxRuntime.jsx(
591
- "button",
592
- {
593
- className: utils.cn(
594
- buttonVariants({
595
- background,
596
- className,
597
- color,
598
- size,
599
- variant
600
- }),
601
- "group/button"
602
- ),
603
- ref,
604
- ...props,
605
- children: content
606
- }
607
- );
608
- }
609
- );
610
- Button.displayName = "Button";
510
+ function Button({
511
+ className,
512
+ variant = "solid",
513
+ color = "primary",
514
+ background,
515
+ size = "medium",
516
+ icon,
517
+ children,
518
+ ...props
519
+ }) {
520
+ return /* @__PURE__ */ jsxRuntime.jsxs(
521
+ button.Button,
522
+ {
523
+ className: utils.cn(
524
+ buttonVariants({ size }),
525
+ colorStyles[color][variant].root,
526
+ background === "fill" && (variant === "outlined" || variant === "invisible") && "bg-elevation-elevation-0",
527
+ "group/button",
528
+ className
529
+ ),
530
+ ...props,
531
+ children: [
532
+ icon && React.cloneElement(icon, {
533
+ className: utils.cn("shrink-0", colorStyles[color][variant].icon, icon.props.className),
534
+ size: icon.props.size ?? iconSizeMap[size]
535
+ }),
536
+ children != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: utils.cn("min-w-0 truncate", size === "xlarge" ? "px-1" : "px-0.5"), children })
537
+ ]
538
+ }
539
+ );
540
+ }
611
541
  var iconButtonSizeClasses = {
612
542
  xsmall: "size-6",
613
543
  small: "size-7",
@@ -615,73 +545,85 @@ var iconButtonSizeClasses = {
615
545
  large: "size-10",
616
546
  xlarge: "size-12"
617
547
  };
618
- var IconButton = React.forwardRef(
619
- ({ className, tooltip, icon, size = "medium", ...props }, ref) => {
620
- const buttonProps = {
548
+ function IconButton({
549
+ className,
550
+ tooltip,
551
+ icon,
552
+ size = "medium",
553
+ "aria-label": ariaLabel,
554
+ "aria-labelledby": ariaLabelledBy,
555
+ ...props
556
+ }) {
557
+ const tooltipLabel = typeof tooltip === "string" ? tooltip : void 0;
558
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkSX23SDUY_js.ConditionalTooltip, { tooltip, children: /* @__PURE__ */ jsxRuntime.jsx(
559
+ Button,
560
+ {
561
+ "aria-label": ariaLabel ?? (ariaLabelledBy === void 0 ? tooltipLabel : void 0),
562
+ "aria-labelledby": ariaLabelledBy,
621
563
  className: utils.cn(iconButtonSizeClasses[size], "px-0", className),
622
564
  icon,
623
565
  size,
624
566
  ...props
625
- };
626
- return /* @__PURE__ */ jsxRuntime.jsx(chunkSX23SDUY_js.ConditionalTooltip, { tooltip, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { ref, ...buttonProps }) });
627
- }
628
- );
629
- IconButton.displayName = "IconButton";
630
- var ButtonGroup = React.forwardRef(
631
- ({
632
- variant = "contained",
633
- iconOnly = false,
634
- hasBackground = false,
635
- size = "medium",
636
- items,
637
- className
638
- }, ref) => {
639
- if (items.length === 0) {
640
- return null;
641
567
  }
642
- const isOutlined = variant === "outlined";
643
- return /* @__PURE__ */ jsxRuntime.jsx(
644
- "div",
645
- {
646
- ref,
647
- className: utils.cn(
648
- "inline-flex items-center overflow-hidden rounded-medium",
649
- hasBackground && "bg-elevation-elevation-0",
650
- className
651
- ),
652
- role: "group",
653
- children: items.map((item, index) => {
654
- const isFirst = index === 0;
655
- const isLast = index === items.length - 1;
656
- const roundedClasses = utils.cn("rounded-none", {
657
- "rounded-l-medium": isFirst,
658
- "rounded-r-medium": isLast
659
- });
660
- const dividerClasses = !isOutlined && !isLast ? "border-r border-border-primary" : "";
661
- const mergeClasses = isOutlined && !isFirst ? "-ml-px" : "";
662
- const hoverClasses = isOutlined ? "relative hover:z-10" : "";
663
- if (iconOnly) {
664
- const iconBaseProps = {
665
- className: utils.cn(roundedClasses, dividerClasses, mergeClasses, hoverClasses),
666
- icon: item.icon,
667
- onClick: item.onClick,
668
- size
669
- };
670
- return /* @__PURE__ */ jsxRuntime.jsx(chunkSX23SDUY_js.ConditionalTooltip, { tooltip: item.tooltip, children: variant === "contained" ? /* @__PURE__ */ jsxRuntime.jsx(IconButton, { ...iconBaseProps, variant: "assistive" }) : /* @__PURE__ */ jsxRuntime.jsx(IconButton, { ...iconBaseProps, color: "primary", variant: "outlined" }) }, item.id);
671
- }
672
- const buttonBaseProps = {
673
- className: utils.cn(roundedClasses, dividerClasses, mergeClasses, hoverClasses),
674
- icon: item.icon,
675
- onClick: item.onClick,
676
- size
677
- };
678
- return /* @__PURE__ */ jsxRuntime.jsx(chunkSX23SDUY_js.ConditionalTooltip, { tooltip: item.tooltip, children: variant === "contained" ? /* @__PURE__ */ jsxRuntime.jsx(Button, { ...buttonBaseProps, variant: "assistive", children: item.label }) : /* @__PURE__ */ jsxRuntime.jsx(Button, { ...buttonBaseProps, color: "primary", variant: "outlined", children: item.label }) }, item.id);
679
- })
680
- }
681
- );
568
+ ) });
569
+ }
570
+ function ButtonGroup({
571
+ variant = "contained",
572
+ iconOnly = false,
573
+ hasBackground = false,
574
+ size = "medium",
575
+ items,
576
+ className,
577
+ ...props
578
+ }) {
579
+ if (items.length === 0) {
580
+ return null;
682
581
  }
683
- );
684
- ButtonGroup.displayName = "ButtonGroup";
582
+ const isOutlined = variant === "outlined";
583
+ const buttonVariantProps = isOutlined ? { color: "primary", variant: "outlined" } : { variant: "assistive" };
584
+ return /* @__PURE__ */ jsxRuntime.jsx(
585
+ "div",
586
+ {
587
+ ...props,
588
+ className: utils.cn(
589
+ "inline-flex items-center overflow-hidden rounded-medium",
590
+ hasBackground && "bg-elevation-elevation-0",
591
+ className
592
+ ),
593
+ role: "group",
594
+ children: items.map((item, index) => {
595
+ const isFirst = index === 0;
596
+ const isLast = index === items.length - 1;
597
+ const roundedClasses = utils.cn("rounded-none", {
598
+ "rounded-l-medium": isFirst,
599
+ "rounded-r-medium": isLast
600
+ });
601
+ const dividerClasses = !isOutlined && !isLast ? "border-r border-border-primary" : "";
602
+ const mergeClasses = isOutlined && !isFirst ? "-ml-px" : "";
603
+ const hoverClasses = isOutlined ? "relative hover:z-10" : "";
604
+ const buttonBaseProps = {
605
+ className: utils.cn(roundedClasses, dividerClasses, mergeClasses, hoverClasses),
606
+ onClick: item.onClick,
607
+ size,
608
+ ...buttonVariantProps
609
+ };
610
+ if (iconOnly) {
611
+ return /* @__PURE__ */ jsxRuntime.jsx(
612
+ IconButton,
613
+ {
614
+ ...buttonBaseProps,
615
+ "aria-label": item.label,
616
+ icon: item.icon,
617
+ tooltip: item.tooltip
618
+ },
619
+ item.id
620
+ );
621
+ }
622
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkSX23SDUY_js.ConditionalTooltip, { tooltip: item.tooltip, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { ...buttonBaseProps, icon: item.icon, children: item.label }) }, item.id);
623
+ })
624
+ }
625
+ );
626
+ }
685
627
  var containerVariants = utils.cva("inline-flex items-center", {
686
628
  variants: {
687
629
  size: {
package/dist/index.mjs CHANGED
@@ -1,11 +1,12 @@
1
- import { ConditionalTooltip, overlayListVariants, commonInputVariants, textFieldVariants, ScrollArea } from './chunk-4JSE66SD.mjs';
1
+ import { overlayListVariants, commonInputVariants, textFieldVariants, ScrollArea, ConditionalTooltip } from './chunk-4JSE66SD.mjs';
2
2
  export { ColorPalette, ColorPaletteColors, Combobox, ComboboxContent, ComboboxDescription, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSearch, ComboboxTrigger, ComboboxValue, DEFAULT_COLOR, ScrollArea, ScrollBar, Segment, Select, Tabs, Tooltip, colorPaletteColorClasses, getColorPaletteColor, isInPalette } from './chunk-4JSE66SD.mjs';
3
3
  import { X, MoreHorizontal, iconSizes, Minus, Check, Person, Loading, Warning, Info, Error as Error$1, ChevronLeft, ChevronRight } from './chunk-4QQPDTTI.mjs';
4
4
  import { cva, cn } from '@exem-ui/core/utils';
5
5
  import * as React from 'react';
6
- import { forwardRef, Fragment, cloneElement, useId, createContext, useContext, useState } from 'react';
6
+ import { forwardRef, Fragment, useId, createContext, useContext, useState, cloneElement } from 'react';
7
7
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
8
8
  import { Slot } from '@radix-ui/react-slot';
9
+ import { Button as Button$1 } from '@base-ui/react/button';
9
10
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
10
11
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
11
12
  import * as SwitchPrimitives from '@radix-ui/react-switch';
@@ -404,185 +405,114 @@ Breadcrumb.Ellipsis.displayName = "Breadcrumb.Ellipsis";
404
405
  var colorStyles = {
405
406
  primary: {
406
407
  solid: {
407
- button: "bg-solid-primary-default hover:bg-solid-primary-hovered disabled:bg-solid-primary-disabled",
408
- icon: "text-icon-inverse group-disabled/button:text-icon-inverse",
409
- text: "text-text-inverse group-disabled/button:text-text-inverse"
408
+ root: "bg-solid-primary-default text-text-inverse hover:bg-solid-primary-hovered data-[disabled]:bg-solid-primary-disabled data-[disabled]:text-text-inverse",
409
+ icon: "text-icon-inverse group-data-[disabled]/button:text-icon-inverse"
410
410
  },
411
411
  assistive: {
412
- button: "bg-elevation-elevation-2 hover:bg-elevation-elevation-3 disabled:bg-elevation-elevation-2",
413
- icon: "text-icon-secondary group-disabled/button:text-icon-disabled",
414
- text: "text-text-secondary group-disabled/button:text-text-disabled"
412
+ root: "bg-elevation-elevation-2 text-text-secondary hover:bg-elevation-elevation-3 data-[disabled]:bg-elevation-elevation-2 data-[disabled]:text-text-disabled",
413
+ icon: "text-icon-secondary group-data-[disabled]/button:text-icon-disabled"
415
414
  },
416
415
  outlined: {
417
- button: "border border-border-primary disabled:border-border-primary hover:bg-elevation-elevation-2",
418
- icon: "text-icon-secondary group-disabled/button:text-icon-disabled",
419
- text: "text-text-secondary group-disabled/button:text-text-disabled"
416
+ root: "border border-border-primary text-text-secondary hover:bg-elevation-elevation-2 data-[disabled]:border-border-primary data-[disabled]:text-text-disabled",
417
+ icon: "text-icon-secondary group-data-[disabled]/button:text-icon-disabled"
420
418
  },
421
419
  invisible: {
422
- button: "hover:bg-elevation-elevation-2",
423
- icon: "text-icon-secondary group-disabled/button:text-icon-disabled",
424
- text: "text-text-secondary group-disabled/button:text-text-disabled"
420
+ root: "text-text-secondary hover:bg-elevation-elevation-2 data-[disabled]:text-text-disabled",
421
+ icon: "text-icon-secondary group-data-[disabled]/button:text-icon-disabled"
425
422
  }
426
423
  },
427
424
  accent: {
428
425
  solid: {
429
- button: "bg-solid-accent-default hover:bg-solid-accent-hovered disabled:bg-solid-accent-disabled",
430
- icon: "text-icon-static-light group-disabled/button:text-icon-inverse-disabled",
431
- text: "text-text-static-light group-disabled/button:text-text-inverse-disabled"
426
+ root: "bg-solid-accent-default text-text-static-light hover:bg-solid-accent-hovered data-[disabled]:bg-solid-accent-disabled data-[disabled]:text-text-inverse-disabled",
427
+ icon: "text-icon-static-light group-data-[disabled]/button:text-icon-inverse-disabled"
432
428
  },
433
429
  assistive: {
434
- button: "bg-elevation-accent-0 hover:bg-elevation-accent-1 disabled:bg-elevation-accent-0",
435
- icon: "text-text-accent group-disabled/button:text-text-accent-disabled",
436
- text: "text-text-accent group-disabled/button:text-text-accent-disabled"
430
+ root: "bg-elevation-accent-0 text-text-accent hover:bg-elevation-accent-1 data-[disabled]:bg-elevation-accent-0 data-[disabled]:text-text-accent-disabled",
431
+ icon: "text-text-accent group-data-[disabled]/button:text-text-accent-disabled"
437
432
  },
438
433
  outlined: {
439
- button: "border border-border-primary disabled:border-border-primary hover:bg-elevation-accent-0",
440
- icon: "text-text-accent group-disabled/button:text-text-accent-disabled",
441
- text: "text-text-accent group-disabled/button:text-text-accent-disabled"
434
+ root: "border border-border-primary text-text-accent hover:bg-elevation-accent-0 data-[disabled]:border-border-primary data-[disabled]:text-text-accent-disabled",
435
+ icon: "text-text-accent group-data-[disabled]/button:text-text-accent-disabled"
442
436
  },
443
437
  invisible: {
444
- button: "hover:bg-elevation-accent-0",
445
- icon: "text-text-accent group-disabled/button:text-text-accent-disabled",
446
- text: "text-text-accent group-disabled/button:text-text-accent-disabled"
438
+ root: "text-text-accent hover:bg-elevation-accent-0 data-[disabled]:text-text-accent-disabled",
439
+ icon: "text-text-accent group-data-[disabled]/button:text-text-accent-disabled"
447
440
  }
448
441
  },
449
442
  critical: {
450
443
  solid: {
451
- button: "bg-solid-critical-default hover:bg-solid-critical-hovered disabled:bg-solid-critical-disabled",
452
- icon: "text-icon-static-light group-disabled/button:text-icon-inverse-disabled",
453
- text: "text-text-static-light group-disabled/button:text-text-inverse-disabled"
444
+ root: "bg-solid-critical-default text-text-static-light hover:bg-solid-critical-hovered data-[disabled]:bg-solid-critical-disabled data-[disabled]:text-text-inverse-disabled",
445
+ icon: "text-icon-static-light group-data-[disabled]/button:text-icon-inverse-disabled"
454
446
  },
455
447
  assistive: {
456
- button: "bg-elevation-critical-0 hover:bg-elevation-critical-1 disabled:bg-elevation-critical-0",
457
- icon: "text-text-critical group-disabled/button:text-text-critical-disabled",
458
- text: "text-text-critical group-disabled/button:text-text-critical-disabled"
448
+ root: "bg-elevation-critical-0 text-text-critical hover:bg-elevation-critical-1 data-[disabled]:bg-elevation-critical-0 data-[disabled]:text-text-critical-disabled",
449
+ icon: "text-text-critical group-data-[disabled]/button:text-text-critical-disabled"
459
450
  },
460
451
  outlined: {
461
- button: "border border-border-primary disabled:border-border-primary hover:bg-elevation-critical-0",
462
- icon: "text-text-critical group-disabled/button:text-text-critical-disabled",
463
- text: "text-text-critical group-disabled/button:text-text-critical-disabled"
452
+ root: "border border-border-primary text-text-critical hover:bg-elevation-critical-0 data-[disabled]:border-border-primary data-[disabled]:text-text-critical-disabled",
453
+ icon: "text-text-critical group-data-[disabled]/button:text-text-critical-disabled"
464
454
  },
465
455
  invisible: {
466
- button: "hover:bg-elevation-critical-0",
467
- icon: "text-text-critical group-disabled/button:text-text-critical-disabled",
468
- text: "text-text-critical group-disabled/button:text-text-critical-disabled"
456
+ root: "text-text-critical hover:bg-elevation-critical-0 data-[disabled]:text-text-critical-disabled",
457
+ icon: "text-text-critical group-data-[disabled]/button:text-text-critical-disabled"
469
458
  }
470
459
  }
471
460
  };
472
461
  var buttonVariants = cva(
473
- "inline-flex w-fit shrink-0 cursor-pointer flex-row items-center justify-center rounded-medium transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:cursor-not-allowed",
462
+ "inline-flex w-fit shrink-0 cursor-pointer flex-row items-center justify-center rounded-medium transition-colors focus-visible:outline-none data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed",
474
463
  {
475
- compoundVariants: [
476
- // Primary 색상 조합
477
- { className: colorStyles.primary.solid.button, color: "primary", variant: "solid" },
478
- { className: colorStyles.primary.assistive.button, color: "primary", variant: "assistive" },
479
- { className: colorStyles.primary.outlined.button, color: "primary", variant: "outlined" },
480
- { className: colorStyles.primary.invisible.button, color: "primary", variant: "invisible" },
481
- // Accent 색상 조합
482
- { className: colorStyles.accent.solid.button, color: "accent", variant: "solid" },
483
- { className: colorStyles.accent.assistive.button, color: "accent", variant: "assistive" },
484
- { className: colorStyles.accent.outlined.button, color: "accent", variant: "outlined" },
485
- { className: colorStyles.accent.invisible.button, color: "accent", variant: "invisible" },
486
- // Critical 색상 조합
487
- { className: colorStyles.critical.solid.button, color: "critical", variant: "solid" },
488
- { className: colorStyles.critical.assistive.button, color: "critical", variant: "assistive" },
489
- { className: colorStyles.critical.outlined.button, color: "critical", variant: "outlined" },
490
- { className: colorStyles.critical.invisible.button, color: "critical", variant: "invisible" },
491
- // background 표면은 outlined/invisible 에서만 추가
492
- {
493
- className: "bg-elevation-elevation-0",
494
- background: "fill",
495
- variant: ["outlined", "invisible"]
496
- }
497
- ],
498
464
  defaultVariants: {
499
- background: "none",
500
- color: "primary",
501
- size: "medium",
502
- variant: "solid"
465
+ size: "medium"
503
466
  },
504
467
  variants: {
505
- background: {
506
- none: "",
507
- fill: ""
508
- },
509
- color: {
510
- accent: "",
511
- critical: "",
512
- primary: ""
513
- },
514
468
  size: {
515
469
  xsmall: "h-6 gap-0 px-1 text-body-3 font-medium",
516
470
  small: "h-7 gap-0.5 px-1.5 text-body-2 font-medium",
517
471
  medium: "h-8 gap-0.5 px-2 text-body-2 font-medium",
518
472
  large: "h-10 gap-1 px-2.5 text-body-1 font-medium",
519
473
  xlarge: "h-12 gap-1 px-3 text-title-2 font-medium"
520
- },
521
- variant: {
522
- solid: "",
523
- assistive: "",
524
- outlined: "",
525
- invisible: ""
526
474
  }
527
475
  }
528
476
  }
529
477
  );
530
- var IconSizeMap = {
478
+ var iconSizeMap = {
531
479
  xsmall: iconSizes.sm,
532
480
  small: iconSizes.sm,
533
481
  medium: iconSizes.sm,
534
482
  large: iconSizes.md,
535
483
  xlarge: iconSizes.lg
536
484
  };
537
- var Button = forwardRef(
538
- ({
539
- className,
540
- variant = "solid",
541
- color = "primary",
542
- background,
543
- size = "medium",
544
- icon,
545
- children,
546
- ...props
547
- }, ref) => {
548
- const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
549
- icon && cloneElement(icon, {
550
- className: cn("shrink-0", colorStyles[color][variant].icon, icon.props.className),
551
- size: icon.props.size ?? IconSizeMap[size]
552
- }),
553
- children != null && /* @__PURE__ */ jsx(
554
- "span",
555
- {
556
- className: cn(
557
- "min-w-0 truncate",
558
- size === "xlarge" ? "px-1" : "px-0.5",
559
- colorStyles[color][variant].text
560
- ),
561
- children
562
- }
563
- )
564
- ] });
565
- return /* @__PURE__ */ jsx(
566
- "button",
567
- {
568
- className: cn(
569
- buttonVariants({
570
- background,
571
- className,
572
- color,
573
- size,
574
- variant
575
- }),
576
- "group/button"
577
- ),
578
- ref,
579
- ...props,
580
- children: content
581
- }
582
- );
583
- }
584
- );
585
- Button.displayName = "Button";
485
+ function Button({
486
+ className,
487
+ variant = "solid",
488
+ color = "primary",
489
+ background,
490
+ size = "medium",
491
+ icon,
492
+ children,
493
+ ...props
494
+ }) {
495
+ return /* @__PURE__ */ jsxs(
496
+ Button$1,
497
+ {
498
+ className: cn(
499
+ buttonVariants({ size }),
500
+ colorStyles[color][variant].root,
501
+ background === "fill" && (variant === "outlined" || variant === "invisible") && "bg-elevation-elevation-0",
502
+ "group/button",
503
+ className
504
+ ),
505
+ ...props,
506
+ children: [
507
+ icon && cloneElement(icon, {
508
+ className: cn("shrink-0", colorStyles[color][variant].icon, icon.props.className),
509
+ size: icon.props.size ?? iconSizeMap[size]
510
+ }),
511
+ children != null && /* @__PURE__ */ jsx("span", { className: cn("min-w-0 truncate", size === "xlarge" ? "px-1" : "px-0.5"), children })
512
+ ]
513
+ }
514
+ );
515
+ }
586
516
  var iconButtonSizeClasses = {
587
517
  xsmall: "size-6",
588
518
  small: "size-7",
@@ -590,73 +520,85 @@ var iconButtonSizeClasses = {
590
520
  large: "size-10",
591
521
  xlarge: "size-12"
592
522
  };
593
- var IconButton = forwardRef(
594
- ({ className, tooltip, icon, size = "medium", ...props }, ref) => {
595
- const buttonProps = {
523
+ function IconButton({
524
+ className,
525
+ tooltip,
526
+ icon,
527
+ size = "medium",
528
+ "aria-label": ariaLabel,
529
+ "aria-labelledby": ariaLabelledBy,
530
+ ...props
531
+ }) {
532
+ const tooltipLabel = typeof tooltip === "string" ? tooltip : void 0;
533
+ return /* @__PURE__ */ jsx(ConditionalTooltip, { tooltip, children: /* @__PURE__ */ jsx(
534
+ Button,
535
+ {
536
+ "aria-label": ariaLabel ?? (ariaLabelledBy === void 0 ? tooltipLabel : void 0),
537
+ "aria-labelledby": ariaLabelledBy,
596
538
  className: cn(iconButtonSizeClasses[size], "px-0", className),
597
539
  icon,
598
540
  size,
599
541
  ...props
600
- };
601
- return /* @__PURE__ */ jsx(ConditionalTooltip, { tooltip, children: /* @__PURE__ */ jsx(Button, { ref, ...buttonProps }) });
602
- }
603
- );
604
- IconButton.displayName = "IconButton";
605
- var ButtonGroup = forwardRef(
606
- ({
607
- variant = "contained",
608
- iconOnly = false,
609
- hasBackground = false,
610
- size = "medium",
611
- items,
612
- className
613
- }, ref) => {
614
- if (items.length === 0) {
615
- return null;
616
542
  }
617
- const isOutlined = variant === "outlined";
618
- return /* @__PURE__ */ jsx(
619
- "div",
620
- {
621
- ref,
622
- className: cn(
623
- "inline-flex items-center overflow-hidden rounded-medium",
624
- hasBackground && "bg-elevation-elevation-0",
625
- className
626
- ),
627
- role: "group",
628
- children: items.map((item, index) => {
629
- const isFirst = index === 0;
630
- const isLast = index === items.length - 1;
631
- const roundedClasses = cn("rounded-none", {
632
- "rounded-l-medium": isFirst,
633
- "rounded-r-medium": isLast
634
- });
635
- const dividerClasses = !isOutlined && !isLast ? "border-r border-border-primary" : "";
636
- const mergeClasses = isOutlined && !isFirst ? "-ml-px" : "";
637
- const hoverClasses = isOutlined ? "relative hover:z-10" : "";
638
- if (iconOnly) {
639
- const iconBaseProps = {
640
- className: cn(roundedClasses, dividerClasses, mergeClasses, hoverClasses),
641
- icon: item.icon,
642
- onClick: item.onClick,
643
- size
644
- };
645
- return /* @__PURE__ */ jsx(ConditionalTooltip, { tooltip: item.tooltip, children: variant === "contained" ? /* @__PURE__ */ jsx(IconButton, { ...iconBaseProps, variant: "assistive" }) : /* @__PURE__ */ jsx(IconButton, { ...iconBaseProps, color: "primary", variant: "outlined" }) }, item.id);
646
- }
647
- const buttonBaseProps = {
648
- className: cn(roundedClasses, dividerClasses, mergeClasses, hoverClasses),
649
- icon: item.icon,
650
- onClick: item.onClick,
651
- size
652
- };
653
- return /* @__PURE__ */ jsx(ConditionalTooltip, { tooltip: item.tooltip, children: variant === "contained" ? /* @__PURE__ */ jsx(Button, { ...buttonBaseProps, variant: "assistive", children: item.label }) : /* @__PURE__ */ jsx(Button, { ...buttonBaseProps, color: "primary", variant: "outlined", children: item.label }) }, item.id);
654
- })
655
- }
656
- );
543
+ ) });
544
+ }
545
+ function ButtonGroup({
546
+ variant = "contained",
547
+ iconOnly = false,
548
+ hasBackground = false,
549
+ size = "medium",
550
+ items,
551
+ className,
552
+ ...props
553
+ }) {
554
+ if (items.length === 0) {
555
+ return null;
657
556
  }
658
- );
659
- ButtonGroup.displayName = "ButtonGroup";
557
+ const isOutlined = variant === "outlined";
558
+ const buttonVariantProps = isOutlined ? { color: "primary", variant: "outlined" } : { variant: "assistive" };
559
+ return /* @__PURE__ */ jsx(
560
+ "div",
561
+ {
562
+ ...props,
563
+ className: cn(
564
+ "inline-flex items-center overflow-hidden rounded-medium",
565
+ hasBackground && "bg-elevation-elevation-0",
566
+ className
567
+ ),
568
+ role: "group",
569
+ children: items.map((item, index) => {
570
+ const isFirst = index === 0;
571
+ const isLast = index === items.length - 1;
572
+ const roundedClasses = cn("rounded-none", {
573
+ "rounded-l-medium": isFirst,
574
+ "rounded-r-medium": isLast
575
+ });
576
+ const dividerClasses = !isOutlined && !isLast ? "border-r border-border-primary" : "";
577
+ const mergeClasses = isOutlined && !isFirst ? "-ml-px" : "";
578
+ const hoverClasses = isOutlined ? "relative hover:z-10" : "";
579
+ const buttonBaseProps = {
580
+ className: cn(roundedClasses, dividerClasses, mergeClasses, hoverClasses),
581
+ onClick: item.onClick,
582
+ size,
583
+ ...buttonVariantProps
584
+ };
585
+ if (iconOnly) {
586
+ return /* @__PURE__ */ jsx(
587
+ IconButton,
588
+ {
589
+ ...buttonBaseProps,
590
+ "aria-label": item.label,
591
+ icon: item.icon,
592
+ tooltip: item.tooltip
593
+ },
594
+ item.id
595
+ );
596
+ }
597
+ return /* @__PURE__ */ jsx(ConditionalTooltip, { tooltip: item.tooltip, children: /* @__PURE__ */ jsx(Button, { ...buttonBaseProps, icon: item.icon, children: item.label }) }, item.id);
598
+ })
599
+ }
600
+ );
601
+ }
660
602
  var containerVariants = cva("inline-flex items-center", {
661
603
  variants: {
662
604
  size: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exem-ui/react",
3
- "version": "0.3.4-next.20260903042316",
3
+ "version": "0.3.4-next.20260908085941",
4
4
  "description": "Exem Design System - React Components",
5
5
  "author": "Exem Design Team",
6
6
  "license": "Apache-2.0",
@@ -100,7 +100,7 @@
100
100
  "tailwind-merge": "^3.3.1",
101
101
  "tailwind-scrollbar-hide": "^4.0.0",
102
102
  "tiny-invariant": "^1.3.3",
103
- "@exem-ui/core": "0.3.3-next.20260903042316"
103
+ "@exem-ui/core": "0.3.3-next.20260908085941"
104
104
  },
105
105
  "devDependencies": {
106
106
  "@eslint/js": "^9.15.0",
@@ -136,7 +136,7 @@
136
136
  "tsup": "^8.5.0",
137
137
  "typescript": "^5.8.2",
138
138
  "typescript-eslint": "^8.16.0",
139
- "@exem-ui/tailwindcss3": "0.3.2-next.20260903042316"
139
+ "@exem-ui/tailwindcss3": "0.3.2-next.20260908085941"
140
140
  },
141
141
  "scripts": {
142
142
  "generate": "node scripts/generate-icons.js",