@exem-ui/react 0.3.4-next.20261014014656 → 0.3.4-next.20261014064943
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.
- package/dist/{FlatTooltip-CQYzMWkr.d.mts → FlatTooltip-CrfIdqNq.d.ts} +89 -24
- package/dist/{FlatTooltip-CQYzMWkr.d.ts → FlatTooltip-eHUMKbuv.d.mts} +89 -24
- package/dist/{chunk-MC4SYR5X.js → chunk-2JF444FU.js} +153 -81
- package/dist/{chunk-5SYAB4WP.mjs → chunk-QO7JYX6Q.mjs} +155 -82
- package/dist/flat/index.d.mts +5 -4
- package/dist/flat/index.d.ts +5 -4
- package/dist/flat/index.js +8 -8
- package/dist/flat/index.mjs +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +46 -46
- package/dist/index.mjs +2 -2
- package/package.json +3 -4
|
@@ -3,10 +3,11 @@ import * as React$1 from 'react';
|
|
|
3
3
|
import React__default, { ComponentProps } from 'react';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
6
|
+
import { I as IconBaseProps } from './types-xnO0gkCW.js';
|
|
6
7
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
7
|
-
import
|
|
8
|
+
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
8
9
|
import { VariantProps } from '@exem-ui/core/utils';
|
|
9
|
-
import * as
|
|
10
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
10
11
|
|
|
11
12
|
type TabsType = 'primary' | 'secondary';
|
|
12
13
|
type TabsRootProps<T extends string = string> = Omit<React__default.ComponentPropsWithoutRef<typeof TabsPrimitive.Root>, 'value' | 'defaultValue' | 'onValueChange'> & {
|
|
@@ -147,13 +148,11 @@ type Icon = React.ReactElement<{
|
|
|
147
148
|
className?: string;
|
|
148
149
|
}>;
|
|
149
150
|
|
|
150
|
-
type SegmentSize = 'small' | 'medium' | 'large';
|
|
151
|
+
type SegmentSize = 'xsmall' | 'small' | 'medium' | 'large';
|
|
151
152
|
type SegmentListProps = React__default.ComponentPropsWithoutRef<typeof TabsPrimitive.List>;
|
|
152
153
|
type SegmentItemProps = React__default.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger> & {
|
|
153
154
|
/** 텍스트 왼쪽에 표시할 아이콘 요소 */
|
|
154
|
-
leftIcon?: React__default.ReactElement<
|
|
155
|
-
className?: string;
|
|
156
|
-
}>;
|
|
155
|
+
leftIcon?: React__default.ReactElement<IconBaseProps>;
|
|
157
156
|
};
|
|
158
157
|
type SegmentContentProps = React__default.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>;
|
|
159
158
|
type SegmentRootProps<T extends string = string> = Omit<React__default.ComponentPropsWithoutRef<typeof TabsPrimitive.Root>, 'value' | 'defaultValue' | 'onValueChange'> & {
|
|
@@ -281,25 +280,87 @@ type SelectComponent = React$1.ForwardRefExoticComponent<SelectRootProps & React
|
|
|
281
280
|
};
|
|
282
281
|
declare const Select: SelectComponent;
|
|
283
282
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
283
|
+
/**
|
|
284
|
+
* Tooltip 스타일 변형.
|
|
285
|
+
*
|
|
286
|
+
* Base UI Tooltip은 radix의 `data-state` 대신 `data-starting-style` / `data-ending-style`로
|
|
287
|
+
* 진입·퇴장을 노출한다. 위치(z-index 포함)는 Positioner가, 모양은 Popup이 맡는다.
|
|
288
|
+
*/
|
|
289
|
+
declare const tooltipVariants: {
|
|
290
|
+
positioner: string;
|
|
291
|
+
content: (props?: ({
|
|
292
|
+
size?: "small" | "medium" | "large" | "xlarge" | "tiny" | null | undefined;
|
|
293
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
294
|
+
title: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
295
|
+
description: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
289
296
|
};
|
|
290
|
-
|
|
291
|
-
type
|
|
292
|
-
type
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
297
|
+
|
|
298
|
+
type TooltipRootProps = Tooltip$1.Root.Props;
|
|
299
|
+
type TooltipProviderProps = Tooltip$1.Provider.Props;
|
|
300
|
+
type TooltipTriggerProps = Tooltip$1.Trigger.Props;
|
|
301
|
+
type TooltipContentProps = Tooltip$1.Popup.Props & VariantProps<typeof tooltipVariants.content> & {
|
|
302
|
+
/** 트리거와 툴팁 사이 간격 */
|
|
303
|
+
sideOffset?: Tooltip$1.Positioner.Props['sideOffset'];
|
|
304
|
+
side?: Tooltip$1.Positioner.Props['side'];
|
|
305
|
+
align?: Tooltip$1.Positioner.Props['align'];
|
|
306
|
+
alignOffset?: Tooltip$1.Positioner.Props['alignOffset'];
|
|
307
|
+
/** 툴팁을 렌더링할 포털 컨테이너 */
|
|
308
|
+
portalContainer?: Tooltip$1.Portal.Props['container'];
|
|
309
|
+
};
|
|
310
|
+
type TooltipTitleProps = React__default.ComponentProps<'div'>;
|
|
311
|
+
type TooltipDescriptionProps = React__default.ComponentProps<'div'>;
|
|
312
|
+
/**
|
|
313
|
+
* 인터페이스 요소 위에 나타나 보조 정보를 제공하는 컴포넌트입니다.
|
|
314
|
+
* Base UI Tooltip 기반이며 Compound Component 패턴으로 하위 컴포넌트와 함께 사용합니다.
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* ```tsx
|
|
318
|
+
* <Tooltip.Provider>
|
|
319
|
+
* <Tooltip>
|
|
320
|
+
* <Tooltip.Trigger render={<Button>호버하세요</Button>} />
|
|
321
|
+
* <Tooltip.Content size="small">
|
|
322
|
+
* <Tooltip.Title>제목</Tooltip.Title>
|
|
323
|
+
* <Tooltip.Description>설명</Tooltip.Description>
|
|
324
|
+
* </Tooltip.Content>
|
|
325
|
+
* </Tooltip>
|
|
326
|
+
* </Tooltip.Provider>
|
|
327
|
+
* ```
|
|
328
|
+
*
|
|
329
|
+
* @see {@link TooltipContentProps} Content props 상세
|
|
330
|
+
* @see https://base-ui.com/react/components/tooltip
|
|
331
|
+
*/
|
|
332
|
+
declare function TooltipRoot(props: TooltipRootProps): react_jsx_runtime.JSX.Element;
|
|
333
|
+
declare namespace TooltipRoot {
|
|
334
|
+
var displayName: string;
|
|
335
|
+
}
|
|
336
|
+
declare function TooltipProvider(props: TooltipProviderProps): react_jsx_runtime.JSX.Element;
|
|
337
|
+
declare namespace TooltipProvider {
|
|
338
|
+
var displayName: string;
|
|
339
|
+
}
|
|
340
|
+
declare function TooltipTrigger(props: TooltipTriggerProps): react_jsx_runtime.JSX.Element;
|
|
341
|
+
declare namespace TooltipTrigger {
|
|
342
|
+
var displayName: string;
|
|
343
|
+
}
|
|
344
|
+
declare function TooltipContent({ className, children, size, sideOffset, side, align, alignOffset, portalContainer, id: idProp, ...props }: TooltipContentProps): react_jsx_runtime.JSX.Element;
|
|
345
|
+
declare namespace TooltipContent {
|
|
346
|
+
var displayName: string;
|
|
347
|
+
}
|
|
348
|
+
declare function TooltipTitle({ className, ...props }: TooltipTitleProps): react_jsx_runtime.JSX.Element;
|
|
349
|
+
declare namespace TooltipTitle {
|
|
350
|
+
var displayName: string;
|
|
351
|
+
}
|
|
352
|
+
declare function TooltipDescription({ className, ...props }: TooltipDescriptionProps): react_jsx_runtime.JSX.Element;
|
|
353
|
+
declare namespace TooltipDescription {
|
|
354
|
+
var displayName: string;
|
|
355
|
+
}
|
|
356
|
+
declare const Tooltip: typeof TooltipRoot & {
|
|
357
|
+
Provider: typeof TooltipProvider;
|
|
358
|
+
Trigger: typeof TooltipTrigger;
|
|
359
|
+
Content: typeof TooltipContent;
|
|
360
|
+
Title: typeof TooltipTitle;
|
|
361
|
+
Description: typeof TooltipDescription;
|
|
298
362
|
};
|
|
299
|
-
|
|
300
|
-
size?: "small" | "medium" | "large" | "xlarge" | "tiny" | null | undefined;
|
|
301
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
302
|
-
declare const Tooltip: TooltipComponent;
|
|
363
|
+
type TooltipComponent = typeof Tooltip;
|
|
303
364
|
|
|
304
365
|
interface FlatTooltipProps {
|
|
305
366
|
/** 툴팁을 적용할 자식 요소 */
|
|
@@ -318,6 +379,10 @@ interface FlatTooltipProps {
|
|
|
318
379
|
alignOffset?: ComponentProps<typeof Tooltip.Content>['alignOffset'];
|
|
319
380
|
/** 툴팁 설명 텍스트 */
|
|
320
381
|
description: React.ReactNode;
|
|
382
|
+
/** 호버 후 툴팁이 나타나기까지의 지연 시간 (ms). 생략하면 `Tooltip.Provider`의 `delay`를 따른다 */
|
|
383
|
+
delay?: ComponentProps<typeof Tooltip.Trigger>['delay'];
|
|
384
|
+
/** 호버가 끝난 뒤 툴팁이 닫히기까지의 지연 시간 (ms) */
|
|
385
|
+
closeDelay?: ComponentProps<typeof Tooltip.Trigger>['closeDelay'];
|
|
321
386
|
}
|
|
322
387
|
/**
|
|
323
388
|
* Tooltip 컴포넌트의 간소화된 Flat API입니다.
|
|
@@ -337,7 +402,7 @@ interface FlatTooltipProps {
|
|
|
337
402
|
* @see {@link FlatTooltipProps} props 상세
|
|
338
403
|
*/
|
|
339
404
|
declare const FlatTooltip: {
|
|
340
|
-
({ children, title, size, description, ...props }: FlatTooltipProps): react_jsx_runtime.JSX.Element;
|
|
405
|
+
({ children, title, size, description, delay, closeDelay, ...props }: FlatTooltipProps): string | number | bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | null | undefined;
|
|
341
406
|
displayName: string;
|
|
342
407
|
};
|
|
343
408
|
/** FlatTooltip 설정 객체 타입 (children 제외) */
|
|
@@ -3,10 +3,11 @@ import * as React$1 from 'react';
|
|
|
3
3
|
import React__default, { ComponentProps } from 'react';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
6
|
+
import { I as IconBaseProps } from './types-xnO0gkCW.mjs';
|
|
6
7
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
7
|
-
import
|
|
8
|
+
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
8
9
|
import { VariantProps } from '@exem-ui/core/utils';
|
|
9
|
-
import * as
|
|
10
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
10
11
|
|
|
11
12
|
type TabsType = 'primary' | 'secondary';
|
|
12
13
|
type TabsRootProps<T extends string = string> = Omit<React__default.ComponentPropsWithoutRef<typeof TabsPrimitive.Root>, 'value' | 'defaultValue' | 'onValueChange'> & {
|
|
@@ -147,13 +148,11 @@ type Icon = React.ReactElement<{
|
|
|
147
148
|
className?: string;
|
|
148
149
|
}>;
|
|
149
150
|
|
|
150
|
-
type SegmentSize = 'small' | 'medium' | 'large';
|
|
151
|
+
type SegmentSize = 'xsmall' | 'small' | 'medium' | 'large';
|
|
151
152
|
type SegmentListProps = React__default.ComponentPropsWithoutRef<typeof TabsPrimitive.List>;
|
|
152
153
|
type SegmentItemProps = React__default.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger> & {
|
|
153
154
|
/** 텍스트 왼쪽에 표시할 아이콘 요소 */
|
|
154
|
-
leftIcon?: React__default.ReactElement<
|
|
155
|
-
className?: string;
|
|
156
|
-
}>;
|
|
155
|
+
leftIcon?: React__default.ReactElement<IconBaseProps>;
|
|
157
156
|
};
|
|
158
157
|
type SegmentContentProps = React__default.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>;
|
|
159
158
|
type SegmentRootProps<T extends string = string> = Omit<React__default.ComponentPropsWithoutRef<typeof TabsPrimitive.Root>, 'value' | 'defaultValue' | 'onValueChange'> & {
|
|
@@ -281,25 +280,87 @@ type SelectComponent = React$1.ForwardRefExoticComponent<SelectRootProps & React
|
|
|
281
280
|
};
|
|
282
281
|
declare const Select: SelectComponent;
|
|
283
282
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
283
|
+
/**
|
|
284
|
+
* Tooltip 스타일 변형.
|
|
285
|
+
*
|
|
286
|
+
* Base UI Tooltip은 radix의 `data-state` 대신 `data-starting-style` / `data-ending-style`로
|
|
287
|
+
* 진입·퇴장을 노출한다. 위치(z-index 포함)는 Positioner가, 모양은 Popup이 맡는다.
|
|
288
|
+
*/
|
|
289
|
+
declare const tooltipVariants: {
|
|
290
|
+
positioner: string;
|
|
291
|
+
content: (props?: ({
|
|
292
|
+
size?: "small" | "medium" | "large" | "xlarge" | "tiny" | null | undefined;
|
|
293
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
294
|
+
title: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
295
|
+
description: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
289
296
|
};
|
|
290
|
-
|
|
291
|
-
type
|
|
292
|
-
type
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
297
|
+
|
|
298
|
+
type TooltipRootProps = Tooltip$1.Root.Props;
|
|
299
|
+
type TooltipProviderProps = Tooltip$1.Provider.Props;
|
|
300
|
+
type TooltipTriggerProps = Tooltip$1.Trigger.Props;
|
|
301
|
+
type TooltipContentProps = Tooltip$1.Popup.Props & VariantProps<typeof tooltipVariants.content> & {
|
|
302
|
+
/** 트리거와 툴팁 사이 간격 */
|
|
303
|
+
sideOffset?: Tooltip$1.Positioner.Props['sideOffset'];
|
|
304
|
+
side?: Tooltip$1.Positioner.Props['side'];
|
|
305
|
+
align?: Tooltip$1.Positioner.Props['align'];
|
|
306
|
+
alignOffset?: Tooltip$1.Positioner.Props['alignOffset'];
|
|
307
|
+
/** 툴팁을 렌더링할 포털 컨테이너 */
|
|
308
|
+
portalContainer?: Tooltip$1.Portal.Props['container'];
|
|
309
|
+
};
|
|
310
|
+
type TooltipTitleProps = React__default.ComponentProps<'div'>;
|
|
311
|
+
type TooltipDescriptionProps = React__default.ComponentProps<'div'>;
|
|
312
|
+
/**
|
|
313
|
+
* 인터페이스 요소 위에 나타나 보조 정보를 제공하는 컴포넌트입니다.
|
|
314
|
+
* Base UI Tooltip 기반이며 Compound Component 패턴으로 하위 컴포넌트와 함께 사용합니다.
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* ```tsx
|
|
318
|
+
* <Tooltip.Provider>
|
|
319
|
+
* <Tooltip>
|
|
320
|
+
* <Tooltip.Trigger render={<Button>호버하세요</Button>} />
|
|
321
|
+
* <Tooltip.Content size="small">
|
|
322
|
+
* <Tooltip.Title>제목</Tooltip.Title>
|
|
323
|
+
* <Tooltip.Description>설명</Tooltip.Description>
|
|
324
|
+
* </Tooltip.Content>
|
|
325
|
+
* </Tooltip>
|
|
326
|
+
* </Tooltip.Provider>
|
|
327
|
+
* ```
|
|
328
|
+
*
|
|
329
|
+
* @see {@link TooltipContentProps} Content props 상세
|
|
330
|
+
* @see https://base-ui.com/react/components/tooltip
|
|
331
|
+
*/
|
|
332
|
+
declare function TooltipRoot(props: TooltipRootProps): react_jsx_runtime.JSX.Element;
|
|
333
|
+
declare namespace TooltipRoot {
|
|
334
|
+
var displayName: string;
|
|
335
|
+
}
|
|
336
|
+
declare function TooltipProvider(props: TooltipProviderProps): react_jsx_runtime.JSX.Element;
|
|
337
|
+
declare namespace TooltipProvider {
|
|
338
|
+
var displayName: string;
|
|
339
|
+
}
|
|
340
|
+
declare function TooltipTrigger(props: TooltipTriggerProps): react_jsx_runtime.JSX.Element;
|
|
341
|
+
declare namespace TooltipTrigger {
|
|
342
|
+
var displayName: string;
|
|
343
|
+
}
|
|
344
|
+
declare function TooltipContent({ className, children, size, sideOffset, side, align, alignOffset, portalContainer, id: idProp, ...props }: TooltipContentProps): react_jsx_runtime.JSX.Element;
|
|
345
|
+
declare namespace TooltipContent {
|
|
346
|
+
var displayName: string;
|
|
347
|
+
}
|
|
348
|
+
declare function TooltipTitle({ className, ...props }: TooltipTitleProps): react_jsx_runtime.JSX.Element;
|
|
349
|
+
declare namespace TooltipTitle {
|
|
350
|
+
var displayName: string;
|
|
351
|
+
}
|
|
352
|
+
declare function TooltipDescription({ className, ...props }: TooltipDescriptionProps): react_jsx_runtime.JSX.Element;
|
|
353
|
+
declare namespace TooltipDescription {
|
|
354
|
+
var displayName: string;
|
|
355
|
+
}
|
|
356
|
+
declare const Tooltip: typeof TooltipRoot & {
|
|
357
|
+
Provider: typeof TooltipProvider;
|
|
358
|
+
Trigger: typeof TooltipTrigger;
|
|
359
|
+
Content: typeof TooltipContent;
|
|
360
|
+
Title: typeof TooltipTitle;
|
|
361
|
+
Description: typeof TooltipDescription;
|
|
298
362
|
};
|
|
299
|
-
|
|
300
|
-
size?: "small" | "medium" | "large" | "xlarge" | "tiny" | null | undefined;
|
|
301
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
302
|
-
declare const Tooltip: TooltipComponent;
|
|
363
|
+
type TooltipComponent = typeof Tooltip;
|
|
303
364
|
|
|
304
365
|
interface FlatTooltipProps {
|
|
305
366
|
/** 툴팁을 적용할 자식 요소 */
|
|
@@ -318,6 +379,10 @@ interface FlatTooltipProps {
|
|
|
318
379
|
alignOffset?: ComponentProps<typeof Tooltip.Content>['alignOffset'];
|
|
319
380
|
/** 툴팁 설명 텍스트 */
|
|
320
381
|
description: React.ReactNode;
|
|
382
|
+
/** 호버 후 툴팁이 나타나기까지의 지연 시간 (ms). 생략하면 `Tooltip.Provider`의 `delay`를 따른다 */
|
|
383
|
+
delay?: ComponentProps<typeof Tooltip.Trigger>['delay'];
|
|
384
|
+
/** 호버가 끝난 뒤 툴팁이 닫히기까지의 지연 시간 (ms) */
|
|
385
|
+
closeDelay?: ComponentProps<typeof Tooltip.Trigger>['closeDelay'];
|
|
321
386
|
}
|
|
322
387
|
/**
|
|
323
388
|
* Tooltip 컴포넌트의 간소화된 Flat API입니다.
|
|
@@ -337,7 +402,7 @@ interface FlatTooltipProps {
|
|
|
337
402
|
* @see {@link FlatTooltipProps} props 상세
|
|
338
403
|
*/
|
|
339
404
|
declare const FlatTooltip: {
|
|
340
|
-
({ children, title, size, description, ...props }: FlatTooltipProps): react_jsx_runtime.JSX.Element;
|
|
405
|
+
({ children, title, size, description, delay, closeDelay, ...props }: FlatTooltipProps): string | number | bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | null | undefined;
|
|
341
406
|
displayName: string;
|
|
342
407
|
};
|
|
343
408
|
/** FlatTooltip 설정 객체 타입 (children 제외) */
|
|
@@ -9,7 +9,7 @@ var React = require('react');
|
|
|
9
9
|
var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
|
|
10
10
|
var TabsPrimitive2 = require('@radix-ui/react-tabs');
|
|
11
11
|
var SelectPrimitive = require('@radix-ui/react-select');
|
|
12
|
-
var
|
|
12
|
+
var tooltip = require('@base-ui/react/tooltip');
|
|
13
13
|
|
|
14
14
|
function _interopNamespace(e) {
|
|
15
15
|
if (e && e.__esModule) return e;
|
|
@@ -34,7 +34,6 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
34
34
|
var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
|
|
35
35
|
var TabsPrimitive2__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive2);
|
|
36
36
|
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
37
|
-
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
|
|
38
37
|
|
|
39
38
|
var colorPaletteColorClasses = {
|
|
40
39
|
mono: { background: "bg-mono-dark", text: "text-mono-dark" },
|
|
@@ -895,6 +894,7 @@ var segmentListVariants = utils.cva(
|
|
|
895
894
|
{
|
|
896
895
|
variants: {
|
|
897
896
|
size: {
|
|
897
|
+
xsmall: "h-6 gap-0 p-0.5",
|
|
898
898
|
small: "h-7 gap-0 p-0.5",
|
|
899
899
|
medium: "h-8 gap-0 p-0.5",
|
|
900
900
|
large: "h-10 gap-0 p-0.5"
|
|
@@ -911,12 +911,14 @@ var segmentItemVariants = utils.cva(
|
|
|
911
911
|
"focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-ring",
|
|
912
912
|
"disabled:cursor-not-allowed",
|
|
913
913
|
"data-[state=active]:bg-component-segmentedOption data-[state=active]:text-text-primary data-[state=active]:shadow-weak",
|
|
914
|
+
"[&[data-state=active]>svg]:text-icon-secondary",
|
|
914
915
|
"data-[state=inactive]:text-text-tertiary data-[state=inactive]:disabled:text-text-disabled",
|
|
915
916
|
"transition-colors duration-200 ease-in-out"
|
|
916
917
|
],
|
|
917
918
|
{
|
|
918
919
|
variants: {
|
|
919
920
|
size: {
|
|
921
|
+
xsmall: "h-5 gap-0.5 text-caption font-medium",
|
|
920
922
|
small: "h-6 gap-0.5 text-body-3 font-medium",
|
|
921
923
|
medium: "h-7 gap-1 text-body-2 font-medium",
|
|
922
924
|
large: "h-9 gap-1.5 text-body-2 font-medium"
|
|
@@ -927,18 +929,12 @@ var segmentItemVariants = utils.cva(
|
|
|
927
929
|
}
|
|
928
930
|
}
|
|
929
931
|
);
|
|
930
|
-
var
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
}
|
|
937
|
-
},
|
|
938
|
-
defaultVariants: {
|
|
939
|
-
size: "medium"
|
|
940
|
-
}
|
|
941
|
-
});
|
|
932
|
+
var segmentIconSizeMap = {
|
|
933
|
+
xsmall: chunk6NFYQZSK_js.iconSizes.xs,
|
|
934
|
+
small: chunk6NFYQZSK_js.iconSizes.sm,
|
|
935
|
+
medium: chunk6NFYQZSK_js.iconSizes.sm,
|
|
936
|
+
large: chunk6NFYQZSK_js.iconSizes.md
|
|
937
|
+
};
|
|
942
938
|
var SegmentContext = React.createContext(void 0);
|
|
943
939
|
var useSegmentContext = () => {
|
|
944
940
|
const context = React.useContext(SegmentContext);
|
|
@@ -973,7 +969,7 @@ Segment.Item = React.forwardRef(
|
|
|
973
969
|
className: utils.cn(segmentItemVariants({ size }), className),
|
|
974
970
|
...props,
|
|
975
971
|
children: [
|
|
976
|
-
leftIcon &&
|
|
972
|
+
leftIcon && React.cloneElement(leftIcon, { size: segmentIconSizeMap[size] }),
|
|
977
973
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center", children })
|
|
978
974
|
]
|
|
979
975
|
}
|
|
@@ -1396,83 +1392,159 @@ function FlatTabs({
|
|
|
1396
1392
|
return /* @__PURE__ */ jsxRuntime.jsx(Tabs, { ...rootProps, children: /* @__PURE__ */ jsxRuntime.jsx(Tabs.List, { className, children: items.map(({ value, children, ...itemProps }) => /* @__PURE__ */ jsxRuntime.jsx(Tabs.Trigger, { value, ...itemProps, children }, value)) }) });
|
|
1397
1393
|
}
|
|
1398
1394
|
FlatTabs.displayName = "FlatTabs";
|
|
1399
|
-
var
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
]
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
]
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
{
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1395
|
+
var tooltipVariants = {
|
|
1396
|
+
positioner: "z-50",
|
|
1397
|
+
content: utils.cva(
|
|
1398
|
+
[
|
|
1399
|
+
"flex flex-col items-start overflow-hidden",
|
|
1400
|
+
"rounded-medium",
|
|
1401
|
+
"text-text-static-light",
|
|
1402
|
+
// Figma의 Tooltip은 테마와 무관하게 다크 모드 값으로 고정된다. bg-component-tooltip은 두 테마가
|
|
1403
|
+
// 같지만 border-primary는 라이트에서 밝아지므로, 다크 값인 gray-08을 직접 쓴다.
|
|
1404
|
+
"bg-component-tooltip border border-gray-08",
|
|
1405
|
+
"shadow-medium",
|
|
1406
|
+
"origin-[var(--transform-origin)] transition-[transform,scale,opacity] duration-150",
|
|
1407
|
+
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
1408
|
+
"data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
|
|
1409
|
+
"data-[instant]:transition-none"
|
|
1410
|
+
],
|
|
1411
|
+
{
|
|
1412
|
+
variants: {
|
|
1413
|
+
size: {
|
|
1414
|
+
tiny: "px-2 py-1 text-body-3",
|
|
1415
|
+
small: "w-[160px] gap-1 px-[12px] py-[10px]",
|
|
1416
|
+
medium: "w-[240px] gap-1 px-[12px] py-[10px]",
|
|
1417
|
+
large: "w-[320px] gap-1 px-[12px] py-[10px]",
|
|
1418
|
+
xlarge: "w-[400px] gap-1 px-[12px] py-[10px]"
|
|
1419
|
+
}
|
|
1420
|
+
},
|
|
1421
|
+
defaultVariants: { size: "small" }
|
|
1422
|
+
}
|
|
1423
|
+
),
|
|
1424
|
+
title: utils.cva([
|
|
1425
|
+
"text-body-2 font-medium text-text-static-light",
|
|
1426
|
+
"group-data-[size=tiny]/tooltip-content:text-body-3"
|
|
1427
|
+
]),
|
|
1428
|
+
description: utils.cva([
|
|
1429
|
+
"text-body-2 font-regular text-text-static-light",
|
|
1430
|
+
"group-data-[size=tiny]/tooltip-content:text-body-3"
|
|
1431
|
+
])
|
|
1432
|
+
};
|
|
1433
|
+
var TooltipA11yContext = React.createContext({ setPopupId: () => {
|
|
1434
|
+
} });
|
|
1435
|
+
function TooltipPopupMounted({ id }) {
|
|
1436
|
+
const { setPopupId } = React.useContext(TooltipA11yContext);
|
|
1437
|
+
React.useEffect(() => {
|
|
1438
|
+
setPopupId(id);
|
|
1439
|
+
return () => setPopupId(void 0);
|
|
1440
|
+
}, [id, setPopupId]);
|
|
1441
|
+
return null;
|
|
1442
|
+
}
|
|
1443
|
+
function TooltipRoot(props) {
|
|
1444
|
+
const [popupId, setPopupId] = React.useState();
|
|
1445
|
+
const a11y = React.useMemo(() => ({ popupId, setPopupId }), [popupId]);
|
|
1446
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TooltipA11yContext.Provider, { value: a11y, children: /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip.Root, { ...props }) });
|
|
1447
|
+
}
|
|
1448
|
+
function TooltipProvider(props) {
|
|
1449
|
+
return /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip.Provider, { ...props });
|
|
1450
|
+
}
|
|
1451
|
+
function TooltipTrigger(props) {
|
|
1452
|
+
const { popupId } = React.useContext(TooltipA11yContext);
|
|
1453
|
+
return /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip.Trigger, { "data-slot": "tooltip-trigger", "aria-describedby": popupId, ...props });
|
|
1454
|
+
}
|
|
1455
|
+
function TooltipContent({
|
|
1456
|
+
className,
|
|
1457
|
+
children,
|
|
1458
|
+
size,
|
|
1459
|
+
sideOffset = 4,
|
|
1460
|
+
side,
|
|
1461
|
+
align,
|
|
1462
|
+
alignOffset,
|
|
1463
|
+
portalContainer,
|
|
1464
|
+
id: idProp,
|
|
1465
|
+
...props
|
|
1466
|
+
}) {
|
|
1467
|
+
const fallbackId = React.useId();
|
|
1468
|
+
const popupId = idProp ?? fallbackId;
|
|
1469
|
+
return /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1470
|
+
tooltip.Tooltip.Positioner,
|
|
1471
|
+
{
|
|
1472
|
+
className: tooltipVariants.positioner,
|
|
1473
|
+
sideOffset,
|
|
1474
|
+
side,
|
|
1475
|
+
align,
|
|
1476
|
+
alignOffset,
|
|
1477
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1478
|
+
tooltip.Tooltip.Popup,
|
|
1479
|
+
{
|
|
1480
|
+
"data-slot": "tooltip-content",
|
|
1481
|
+
"data-size": size,
|
|
1482
|
+
id: popupId,
|
|
1483
|
+
role: "tooltip",
|
|
1484
|
+
className: utils.cn("group/tooltip-content", tooltipVariants.content({ size }), className),
|
|
1485
|
+
...props,
|
|
1486
|
+
children: [
|
|
1487
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipPopupMounted, { id: popupId }),
|
|
1488
|
+
children
|
|
1489
|
+
]
|
|
1490
|
+
}
|
|
1491
|
+
)
|
|
1492
|
+
}
|
|
1493
|
+
) });
|
|
1494
|
+
}
|
|
1495
|
+
function TooltipTitle({ className, ...props }) {
|
|
1496
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "tooltip-title", className: utils.cn(tooltipVariants.title(), className), ...props });
|
|
1497
|
+
}
|
|
1498
|
+
function TooltipDescription({ className, ...props }) {
|
|
1499
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1500
|
+
"div",
|
|
1501
|
+
{
|
|
1502
|
+
"data-slot": "tooltip-description",
|
|
1503
|
+
className: utils.cn(tooltipVariants.description(), className),
|
|
1504
|
+
...props
|
|
1505
|
+
}
|
|
1506
|
+
);
|
|
1507
|
+
}
|
|
1508
|
+
TooltipRoot.displayName = "Tooltip";
|
|
1509
|
+
TooltipProvider.displayName = "Tooltip.Provider";
|
|
1510
|
+
TooltipTrigger.displayName = "Tooltip.Trigger";
|
|
1511
|
+
TooltipContent.displayName = "Tooltip.Content";
|
|
1512
|
+
TooltipTitle.displayName = "Tooltip.Title";
|
|
1513
|
+
TooltipDescription.displayName = "Tooltip.Description";
|
|
1514
|
+
var Tooltip = Object.assign(TooltipRoot, {
|
|
1515
|
+
Provider: TooltipProvider,
|
|
1516
|
+
Trigger: TooltipTrigger,
|
|
1517
|
+
Content: TooltipContent,
|
|
1518
|
+
Title: TooltipTitle,
|
|
1519
|
+
Description: TooltipDescription
|
|
1520
|
+
});
|
|
1521
|
+
var FlatTooltip = ({
|
|
1522
|
+
children,
|
|
1523
|
+
title,
|
|
1524
|
+
size,
|
|
1525
|
+
description,
|
|
1526
|
+
delay,
|
|
1527
|
+
closeDelay,
|
|
1528
|
+
...props
|
|
1529
|
+
}) => {
|
|
1530
|
+
if (!React.isValidElement(children)) {
|
|
1531
|
+
return children;
|
|
1447
1532
|
}
|
|
1448
|
-
|
|
1449
|
-
Tooltip.
|
|
1450
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: utils.cn(tooltipTitleVariants(), className), ...props, children })
|
|
1451
|
-
);
|
|
1452
|
-
Tooltip.Description = React.forwardRef(
|
|
1453
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: utils.cn(tooltipTextVariants(), className), ...props, children })
|
|
1454
|
-
);
|
|
1455
|
-
Tooltip.displayName = "Tooltip";
|
|
1456
|
-
Tooltip.Content.displayName = "Tooltip.Content";
|
|
1457
|
-
Tooltip.Title.displayName = "Tooltip.Title";
|
|
1458
|
-
Tooltip.Description.displayName = "Tooltip.Description";
|
|
1459
|
-
Tooltip.Trigger.displayName = "Tooltip.Trigger";
|
|
1460
|
-
Tooltip.Provider.displayName = "Tooltip.Provider";
|
|
1461
|
-
var FlatTooltip = ({ children, title, size, description, ...props }) => {
|
|
1462
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Tooltip.Provider, { delayDuration: 0, skipDelayDuration: 0, children: /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
1463
|
-
/* @__PURE__ */ jsxRuntime.jsx(Tooltip.Trigger, { asChild: true, children }),
|
|
1533
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
1534
|
+
/* @__PURE__ */ jsxRuntime.jsx(Tooltip.Trigger, { render: children, delay, closeDelay }),
|
|
1464
1535
|
/* @__PURE__ */ jsxRuntime.jsxs(Tooltip.Content, { size, ...props, children: [
|
|
1465
1536
|
title && /* @__PURE__ */ jsxRuntime.jsx(Tooltip.Title, { children: title }),
|
|
1466
1537
|
description && /* @__PURE__ */ jsxRuntime.jsx(Tooltip.Description, { children: description })
|
|
1467
1538
|
] })
|
|
1468
|
-
] })
|
|
1539
|
+
] });
|
|
1469
1540
|
};
|
|
1470
1541
|
function ConditionalTooltip({ children, tooltip }) {
|
|
1471
1542
|
if (typeof tooltip === "string") {
|
|
1472
1543
|
return /* @__PURE__ */ jsxRuntime.jsx(FlatTooltip, { size: "tiny", description: tooltip, children });
|
|
1473
1544
|
}
|
|
1474
1545
|
if (tooltip && typeof tooltip === "object" && "description" in tooltip && tooltip.use !== false) {
|
|
1475
|
-
|
|
1546
|
+
const { use: _use, ...config } = tooltip;
|
|
1547
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FlatTooltip, { ...config, size: config.size || "tiny", children });
|
|
1476
1548
|
}
|
|
1477
1549
|
return children;
|
|
1478
1550
|
}
|