@liner-fe/prism 2.8.19 → 2.8.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/package.json +3 -16
  2. package/lib/index.cjs +0 -8454
  3. package/lib/index.d.mts +0 -631
package/lib/index.d.mts DELETED
@@ -1,631 +0,0 @@
1
- import { SystemKeys, TypographyCaptionPrefix, TypographyParagraphPrefix, TypographyHeadingPrefix, TypographyTitlePrefix, TypographyDisplayPrefix, BasicColorType } from '@liner-fe/design-token-primitive';
2
- import * as react from 'react';
3
- import react__default, { ButtonHTMLAttributes, RefAttributes, HTMLAttributes, ReactNode, ComponentPropsWithoutRef, InputHTMLAttributes, ComponentProps, LiHTMLAttributes, MouseEventHandler } from 'react';
4
- import * as cva from 'cva';
5
- import { VariantProps } from 'cva';
6
- import { IconProps, IconComponentType } from '@liner-fe/icon';
7
- import * as react_jsx_runtime from 'react/jsx-runtime';
8
- import { ToastProps } from '@radix-ui/react-toast';
9
- import * as _artsy_fresnel_dist_Media from '@artsy/fresnel/dist/Media';
10
- import { breakpointOrigin } from '@liner-fe/design-token';
11
- import { Popover as Popover$1, Tooltip as Tooltip$1, Checkbox as Checkbox$1, RadioGroup, Select as Select$1, Label as Label$1 } from 'radix-ui';
12
- import * as recoil from 'recoil';
13
- import * as PopoverPrimitive from '@radix-ui/react-popover';
14
- import { PopoverProps, PopoverPortalProps } from '@radix-ui/react-popover';
15
- import { IllustProps } from '@liner-fe/illust';
16
-
17
- declare const objectToArray: <T extends Record<string, unknown>>(obj: T) => [string, unknown][];
18
- declare const arrayToStyleObject: <T extends SystemKeys>(colorKeys: T[], style: {
19
- readonly [key: string]: string;
20
- }, prefix?: string) => Partial<Record<SystemKeys, string>>;
21
- declare const isEmptyObject: (obj: object) => boolean;
22
-
23
- declare const defaultButtonVariants: (props?: ({
24
- level?: "primary" | "secondary" | "tertiary" | "quaternary" | "quinary" | "negative" | "static" | "inverse-static" | undefined;
25
- fill?: boolean | undefined;
26
- align?: "center" | "spaceBetween" | undefined;
27
- size?: "l" | "m" | "s" | "cta" | undefined;
28
- width?: "full" | "fit-content" | undefined;
29
- } & ({
30
- class?: cva.ClassValue;
31
- className?: never;
32
- } | {
33
- class?: never;
34
- className?: cva.ClassValue;
35
- })) | undefined) => string;
36
- interface CommonButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
37
- as?: 'default' | 'text';
38
- asChild?: boolean;
39
- }
40
- type FillType = boolean;
41
- type FillLevelType = 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'quinary' | 'negative' | 'static' | 'inverse-static';
42
- type FillFalseLevelType = 'primary' | 'secondary';
43
- type ButtonSizeType = 'cta' | 'l' | 'm' | 's';
44
- type DefaultLevelType<T> = T extends true ? FillLevelType : FillFalseLevelType;
45
- type ButtonIconProps = Pick<IconProps, 'type' | 'size' | 'thick' | 'fill'>;
46
- interface DefaultButtonProps<T extends FillType> extends CommonButtonProps, VariantProps<typeof defaultButtonVariants> {
47
- asChild?: boolean;
48
- level?: DefaultLevelType<T>;
49
- fill?: T;
50
- size?: ButtonSizeType;
51
- align?: 'center' | 'spaceBetween';
52
- width?: 'full' | 'fit-content';
53
- leftIcon?: {
54
- icon: IconComponentType;
55
- } & ButtonIconProps;
56
- rightIcon?: {
57
- icon: IconComponentType;
58
- } & ButtonIconProps;
59
- isLoading?: boolean;
60
- }
61
- type ButtonProps = DefaultButtonProps<FillType>;
62
- declare const DefaultButton: react.ForwardRefExoticComponent<DefaultButtonProps<boolean> & react.RefAttributes<HTMLButtonElement>>;
63
- declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
64
-
65
- interface IToastBase extends ToastProps, RefAttributes<HTMLLIElement> {
66
- toastId: number;
67
- message: string;
68
- timer: number;
69
- isLoading?: boolean;
70
- }
71
- interface IToastIcon {
72
- icon: {
73
- icon: IconComponentType;
74
- } & Pick<IconProps, 'fill' | 'thick' | 'type' | 'fillType'>;
75
- button?: never;
76
- }
77
- interface IToastButton {
78
- icon?: never;
79
- button: {
80
- onClick: () => void;
81
- label: string;
82
- };
83
- }
84
- type ToastProp = IToastBase & (IToastIcon | IToastButton);
85
- declare const Toaster: () => react_jsx_runtime.JSX.Element;
86
-
87
- type StrictOmit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
88
-
89
- declare const useToast: () => {
90
- open: (toast: StrictOmit<ToastProp, "toastId" | "timer">) => {
91
- toastId: number;
92
- };
93
- endLoading: (toastId: number) => void;
94
- };
95
-
96
- interface ITypographyCommon<T extends HTMLElement = HTMLParagraphElement> extends Omit<HTMLAttributes<T>, 'color'>, WithHTMLAsProps {
97
- color?: SystemKeys;
98
- }
99
- type BOLD = 'bold';
100
- type MEDIUM = 'medium';
101
- type REGULAR = 'regular';
102
- type ANSWER = 'answer';
103
- type ACCENT = 'accent';
104
- type NORMAL = 'normal';
105
- type POST = 'post';
106
- type AcceptAsHTMLTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'header' | 'footer' | 'p' | 'article' | 'body' | 'main' | 'b' | 'blockquote';
107
- interface WithHTMLAsProps {
108
- as?: Extract<keyof HTMLElementTagNameMap, AcceptAsHTMLTag>;
109
- }
110
- type HTMLAsElementObject = Pick<HTMLElementTagNameMap, AcceptAsHTMLTag>;
111
- type HTMLAsElement = HTMLAsElementObject[keyof HTMLAsElementObject];
112
-
113
- interface IHeadingProps extends ITypographyCommon<HTMLAsElement> {
114
- type: 'answer';
115
- size: 1 | 2 | 3 | 4 | 5 | 6;
116
- }
117
- declare const Heading: react__default.ForwardRefExoticComponent<IHeadingProps & react__default.RefAttributes<HTMLAsElement>>;
118
-
119
- interface IPropsNormalBold extends ITypographyCommon<HTMLElement> {
120
- type: NORMAL;
121
- size: 1 | 2 | 3;
122
- weight: BOLD;
123
- }
124
- interface IPropsNormalRegular extends ITypographyCommon<HTMLElement> {
125
- type: NORMAL;
126
- size: 1 | 2 | 3;
127
- weight: REGULAR;
128
- }
129
- interface IPropsNormalMedium extends ITypographyCommon<HTMLElement> {
130
- type: NORMAL;
131
- size: 1 | 2 | 3;
132
- weight: MEDIUM;
133
- }
134
- type ICaptionProps = IPropsNormalBold | IPropsNormalRegular | IPropsNormalMedium;
135
- declare const Caption: react.ForwardRefExoticComponent<ICaptionProps & react.RefAttributes<HTMLParagraphElement>>;
136
-
137
- interface IPropsNormal extends ITypographyCommon {
138
- type: NORMAL;
139
- size: 1 | 2 | 3 | 4;
140
- weight: REGULAR | MEDIUM | BOLD;
141
- }
142
- interface IPropsPost extends ITypographyCommon {
143
- type: POST;
144
- size: 2 | 3 | 4;
145
- weight: REGULAR;
146
- }
147
- interface IPropsAccent extends ITypographyCommon {
148
- type: ACCENT;
149
- size: 1 | 2 | 3;
150
- weight: REGULAR | MEDIUM | BOLD;
151
- }
152
- interface IPropsAnswer extends ITypographyCommon {
153
- type: ANSWER;
154
- size: 2;
155
- weight: BOLD | REGULAR;
156
- }
157
- type ParagraphProps = IPropsNormal | IPropsPost | IPropsAccent | IPropsAnswer;
158
- declare const Paragraph: react.ForwardRefExoticComponent<ParagraphProps & react.RefAttributes<HTMLParagraphElement>>;
159
-
160
- interface ITitleProps extends ITypographyCommon {
161
- type: ACCENT | NORMAL;
162
- weight: BOLD;
163
- size: 1 | 2 | 3 | 4 | 5;
164
- }
165
- declare const Title: react__default.ForwardRefExoticComponent<ITitleProps & react__default.RefAttributes<HTMLParagraphElement>>;
166
-
167
- interface IDisplayProps extends ITypographyCommon {
168
- size: 2 | 3;
169
- type: 'accent';
170
- weight: 'black';
171
- }
172
- declare const Display: react.ForwardRefExoticComponent<IDisplayProps & react.RefAttributes<HTMLParagraphElement>>;
173
-
174
- type BreakPointsKey = keyof typeof breakpointOrigin;
175
- declare const rootMediaStyle: string;
176
- declare const MediaContextProvider: react.ComponentType<_artsy_fresnel_dist_Media.MediaContextProviderProps<"xl" | "l" | "m" | "s" | "xs" | "xxl" | "xxxl"> & {
177
- children: react.ReactNode;
178
- }>;
179
- declare const Media: react.ComponentType<_artsy_fresnel_dist_Media.MediaProps<"xl" | "l" | "m" | "s" | "xs" | "xxl" | "xxxl", never>>;
180
-
181
- declare const KEY = "level";
182
-
183
- type OmitChildren<T, P extends string | react__default.ReactNode> = Omit<T, 'children'> & {
184
- text?: P;
185
- };
186
- type TypoSet<T extends string | react__default.ReactNode = string> = ({
187
- [KEY]: TypographyCaptionPrefix;
188
- } & OmitChildren<ICaptionProps, T>) | ({
189
- [KEY]: TypographyParagraphPrefix;
190
- } & OmitChildren<ParagraphProps, T>) | ({
191
- [KEY]: TypographyHeadingPrefix;
192
- } & OmitChildren<IHeadingProps, T>) | ({
193
- [KEY]: TypographyTitlePrefix;
194
- } & OmitChildren<ITitleProps, T>) | ({
195
- [KEY]: TypographyDisplayPrefix;
196
- } & OmitChildren<IDisplayProps, T>);
197
-
198
- type TypographyType = (props: Partial<Record<BreakPointsKey, TypoSet>> & {
199
- children?: react__default.ReactNode;
200
- }) => JSX.Element;
201
- declare const Typography: TypographyType;
202
-
203
- /**
204
- * PopoverRoot
205
- */
206
- interface PopoverRootProps {
207
- isOpen?: boolean;
208
- children?: react.ReactNode;
209
- onChange?: (isOpen: boolean) => void;
210
- }
211
- /**
212
- * PopoverTrigger
213
- */
214
- interface PopoverTriggerProps {
215
- by?: ReactNode;
216
- }
217
- /**
218
- * PopoverContent
219
- */
220
- interface PopoverContentProps extends HTMLAttributes<HTMLDivElement> {
221
- level?: 'primary' | 'secondary';
222
- tag?: string;
223
- icon?: {
224
- icon: IconComponentType;
225
- } & Pick<IconProps, 'thick' | 'fill'>;
226
- title?: string;
227
- description?: string;
228
- position?: 'top' | 'right' | 'bottom' | 'left';
229
- align?: 'start' | 'center' | 'end';
230
- confirmText?: string;
231
- isOverlay?: boolean;
232
- container?: HTMLElement;
233
- onConfirm?: () => void;
234
- onClose?: () => void;
235
- onPointerDownOutside?: () => void;
236
- }
237
- declare const Popover: (({ isOpen, children, onChange }: PopoverRootProps) => react_jsx_runtime.JSX.Element) & {
238
- Trigger: ({ by }: PopoverTriggerProps) => react_jsx_runtime.JSX.Element;
239
- Content: react.ForwardRefExoticComponent<PopoverContentProps & react.RefAttributes<HTMLDivElement>>;
240
- Arrow: react.ForwardRefExoticComponent<Popover$1.PopoverArrowProps & react.RefAttributes<SVGSVGElement>>;
241
- Close: react.ForwardRefExoticComponent<Popover$1.PopoverCloseProps & react.RefAttributes<HTMLButtonElement>>;
242
- };
243
-
244
- interface TooltipRootProps {
245
- /**
246
- * Tooltip 내부에 렌더링할 컴포넌트입니다.
247
- */
248
- children?: ReactNode;
249
- /**
250
- * Tooltip의 열림 상태를 제어합니다.
251
- * controlled 상태로 사용할 때 활용합니다.
252
- */
253
- open?: boolean;
254
- /**
255
- * Tooltip의 초기 열림 상태를 설정합니다.
256
- * uncontrolled 상태로 사용할 때 활용합니다.
257
- */
258
- defaultOpen?: boolean;
259
- /**
260
- * Tooltip의 열림/닫힘 상태가 변경될 때 호출되는 콜백 함수입니다.
261
- */
262
- onOpenChange?: (open: boolean) => void;
263
- /**
264
- * 마우스가 Trigger에 진입한 후 Tooltip이 열리기까지의 지연 시간(ms)입니다.
265
- * Provider에 설정된 값을 재정의합니다.
266
- * @default 0
267
- */
268
- delayDuration?: number;
269
- /**
270
- * true로 설정하면 Tooltip 컨텐츠에 마우스를 올렸을 때
271
- * Trigger를 벗어나도 Tooltip이 닫히지 않습니다.
272
- * @default false
273
- */
274
- disableHoverableContent?: boolean;
275
- }
276
- type Side = 'top' | 'right' | 'bottom' | 'left';
277
- interface TooltipTriggerProps {
278
- /**
279
- * @param by
280
- * Tooltip을 표시할 트리거 엘리먼트를 설정합니다.
281
- */
282
- by: ReactNode;
283
- }
284
- interface TooltipContentProps extends ComponentPropsWithoutRef<typeof Tooltip$1.Content> {
285
- children?: ReactNode;
286
- /**
287
- * @param description
288
- * Tooltip안에 표시할 텍스트 컨텐츠를 설정합니다.
289
- */
290
- description?: string;
291
- /**
292
- * @param position
293
- * Tooltip을 렌더링할 방향을 설정합니다.
294
- */
295
- position?: Side;
296
- /**
297
- * @param offset
298
- * Tooltip과 Trigger 사이의 간격을 설정합니다(px)
299
- */
300
- offset?: 'medium' | 'high';
301
- /**
302
- * @param collisionPadding
303
- * Tooltip이 충돌 판정을 받는 영역을 조정합니다.
304
- */
305
- collisionPadding?: number | Partial<Record<Side, number>>;
306
- }
307
- declare const Tooltip: (({ children, ...props }: TooltipRootProps) => react_jsx_runtime.JSX.Element) & {
308
- Provider: react__default.FC<Tooltip$1.TooltipProviderProps>;
309
- Trigger: ({ by }: TooltipTriggerProps) => react_jsx_runtime.JSX.Element;
310
- Content: react__default.ForwardRefExoticComponent<TooltipContentProps & react__default.RefAttributes<HTMLDivElement>>;
311
- };
312
-
313
- declare const iconButtonVariants: (props?: ({
314
- level?: "primary" | "secondary" | "tertiary" | "quaternary" | "negative" | "static" | "inverse-static" | "inverse" | undefined;
315
- size?: "l" | "m" | "s" | "xs" | undefined;
316
- fill?: boolean | undefined;
317
- } & ({
318
- class?: cva.ClassValue;
319
- className?: never;
320
- } | {
321
- class?: never;
322
- className?: cva.ClassValue;
323
- })) | undefined) => string;
324
- type IconButtonLevelType = 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'negative' | 'static' | 'inverse' | 'inverse-static';
325
- type IconSizeType = 'l' | 'm' | 's' | 'xs';
326
- interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof iconButtonVariants> {
327
- asChild?: boolean;
328
- size?: 'l' | 'm' | 's' | 'xs';
329
- fill?: boolean;
330
- level?: IconButtonLevelType;
331
- icon: {
332
- icon: IconComponentType;
333
- } & Pick<IconProps, 'type' | 'size' | 'thick' | 'fill' | 'fillType'>;
334
- isLoading?: boolean;
335
- }
336
- declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
337
-
338
- interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof Checkbox$1.Root> {
339
- label?: string;
340
- description?: string;
341
- }
342
- declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLButtonElement>>;
343
-
344
- interface RadioItemProps extends ComponentPropsWithoutRef<typeof RadioGroup.Item> {
345
- label?: string;
346
- description?: string;
347
- }
348
- declare const Radio: react.ForwardRefExoticComponent<Omit<RadioGroup.RadioGroupProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>> & {
349
- Item: react.ForwardRefExoticComponent<RadioItemProps & react.RefAttributes<HTMLButtonElement>>;
350
- };
351
-
352
- declare const defaultTextfieldVariants: (props?: ({
353
- color?: "neutral-container-lowest" | "neutral-container-mid" | undefined;
354
- } & ({
355
- class?: cva.ClassValue;
356
- className?: never;
357
- } | {
358
- class?: never;
359
- className?: cva.ClassValue;
360
- })) | undefined) => string;
361
- type TextfieldButtonProps = Omit<DefaultButtonProps<FillType>, 'size'>;
362
- type TextfieldLabelType = 'in' | 'out' | 'visually-hidden';
363
- interface TextfieldLabelProps {
364
- text: string;
365
- type?: TextfieldLabelType;
366
- }
367
- interface TextfieldProps extends InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof defaultTextfieldVariants> {
368
- label?: TextfieldLabelProps;
369
- value?: string;
370
- maxCharacter?: number;
371
- error?: string;
372
- disabled?: boolean;
373
- button?: TextfieldButtonProps;
374
- color?: Extract<BasicColorType, 'neutral-container-mid' | 'neutral-container-lowest'>;
375
- onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
376
- onClear?: () => void;
377
- }
378
- declare const Textfield: react.ForwardRefExoticComponent<TextfieldProps & react.RefAttributes<HTMLInputElement>>;
379
-
380
- interface SelectProps extends ComponentPropsWithoutRef<typeof Select$1.Root> {
381
- id?: string;
382
- placeholder?: string;
383
- label?: string;
384
- chip?: string;
385
- listLabel?: string;
386
- popSide?: ComponentProps<typeof Select$1.Content>['side'];
387
- sideOffset?: ComponentProps<typeof Select$1.Content>['sideOffset'];
388
- isResponsive?: boolean;
389
- openDirection?: 'slide-up' | 'slide-right';
390
- badge?: string;
391
- container?: HTMLElement;
392
- }
393
- interface SelectItemProps {
394
- value: string;
395
- text?: string;
396
- disabled?: boolean;
397
- icon?: {
398
- icon: IconComponentType;
399
- } & Pick<IconProps, 'fill' | 'thick' | 'type' | 'fillType' | 'size'>;
400
- onClick?: () => void;
401
- }
402
- declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<never>> & {
403
- Item: ({ value, text, disabled, icon, onClick }: SelectItemProps) => react_jsx_runtime.JSX.Element;
404
- };
405
-
406
- interface ListRootProps extends LiHTMLAttributes<HTMLUListElement> {
407
- children?: ReactNode;
408
- value?: string;
409
- onChangeValue?: (value: string) => void;
410
- }
411
- interface ItemProps {
412
- value: string;
413
- text: string;
414
- disabled?: boolean;
415
- icon?: {
416
- icon: IconComponentType;
417
- } & Pick<IconProps, 'fill' | 'thick' | 'type' | 'fillType' | 'size'>;
418
- onClick?: () => void;
419
- }
420
- declare const List: (({ children, className, ...props }: ListRootProps) => react_jsx_runtime.JSX.Element) & {
421
- Item: ({ value, text, disabled, icon, onClick }: ItemProps) => react_jsx_runtime.JSX.Element;
422
- };
423
-
424
- interface ISnackbarBase extends ToastProps {
425
- title: string;
426
- description?: string;
427
- position?: 'left' | 'right';
428
- }
429
- interface ButtonType {
430
- onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
431
- text: string;
432
- }
433
- interface ISnackbarBasic {
434
- kind?: 'basic';
435
- icon?: {
436
- icon: IconComponentType;
437
- } & Pick<IconProps, 'fill' | 'thick' | 'type' | 'fillType'>;
438
- button?: {
439
- text?: ButtonType;
440
- basic?: ButtonType;
441
- };
442
- }
443
- interface ISnackbarNavigation {
444
- kind: 'navigation';
445
- button: {
446
- onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
447
- };
448
- }
449
- interface ISnackbarExtended {
450
- kind: 'extended';
451
- button?: {
452
- text?: ButtonType;
453
- basic?: ButtonType;
454
- };
455
- }
456
- type SnackbarProp = ISnackbarBase & (ISnackbarBasic | ISnackbarNavigation | ISnackbarExtended);
457
- type SnackbarPropWithId = SnackbarProp & {
458
- snackbarId: number;
459
- };
460
-
461
- declare const Snackbar: () => react_jsx_runtime.JSX.Element;
462
- declare const SingleSnackbar: (props: SnackbarPropWithId & {
463
- position: "left" | "right";
464
- }) => react_jsx_runtime.JSX.Element;
465
-
466
- declare const snackbarAtom: recoil.RecoilState<SnackbarPropWithId[]>;
467
- declare const useSnackbar: () => {
468
- open: (info: SnackbarProp) => void;
469
- };
470
-
471
- declare const defaultLabelVariants: (props?: ({
472
- level?: "primary" | "secondary" | undefined;
473
- position?: "right" | "top" | undefined;
474
- size?: "l" | "m" | "s" | undefined;
475
- offset?: "medium" | "high" | "low" | undefined;
476
- disabled?: boolean | undefined;
477
- error?: boolean | undefined;
478
- } & ({
479
- class?: cva.ClassValue;
480
- className?: never;
481
- } | {
482
- class?: never;
483
- className?: cva.ClassValue;
484
- })) | undefined) => string;
485
- interface LabelProps extends ComponentPropsWithoutRef<typeof Label$1.Root>, VariantProps<typeof defaultLabelVariants> {
486
- level?: 'primary' | 'secondary';
487
- position?: 'top' | 'right';
488
- size?: 'l' | 'm' | 's';
489
- offset?: 'high' | 'medium' | 'low';
490
- disabled?: boolean;
491
- error?: boolean;
492
- }
493
- declare const Label: react.ForwardRefExoticComponent<LabelProps & react.RefAttributes<HTMLLabelElement>>;
494
-
495
- declare const textButtonVariants: (props?: ({
496
- level?: "primary" | "secondary" | "tertiary" | "inverse-static" | "inverse" | undefined;
497
- size?: "m" | "s" | undefined;
498
- thick?: boolean | undefined;
499
- underline?: boolean | undefined;
500
- } & ({
501
- class?: cva.ClassValue;
502
- className?: never;
503
- } | {
504
- class?: never;
505
- className?: cva.ClassValue;
506
- })) | undefined) => string;
507
- type TextLevelType = 'primary' | 'secondary' | 'tertiary' | 'inverse' | 'inverse-static';
508
- type TextButtonSizeType = Extract<ButtonSizeType, 'm' | 's'>;
509
- interface TextButtonProps extends CommonButtonProps, VariantProps<typeof textButtonVariants> {
510
- asChild?: boolean;
511
- level?: TextLevelType;
512
- thick?: boolean;
513
- underline?: boolean;
514
- size?: TextButtonSizeType;
515
- leftIcon?: {
516
- icon: IconComponentType;
517
- } & Pick<IconProps, 'type' | 'size' | 'thick' | 'fill'>;
518
- rightIcon?: {
519
- icon: IconComponentType;
520
- } & Pick<IconProps, 'type' | 'size' | 'thick' | 'fill'>;
521
- }
522
- declare const TextButton: react.ForwardRefExoticComponent<TextButtonProps & react.RefAttributes<HTMLButtonElement>>;
523
-
524
- type LoadingSizeType = 'xl' | 'l' | 'm' | 's' | 'xs';
525
- type LoadingLevelType = 'brand-label-primary' | 'neutral-label-primary' | 'neutral-label-static-primary' | 'inverse-label-primary' | 'inverse-label-static-primary';
526
- interface LoadingProps {
527
- size?: LoadingSizeType;
528
- level?: LoadingLevelType;
529
- type?: 'dots' | 'spinner';
530
- }
531
- declare const Loading: ({ type, ...props }: LoadingProps) => react_jsx_runtime.JSX.Element;
532
-
533
- interface LogoSquareProps {
534
- type: 'circle' | 'favicon';
535
- size: number;
536
- className?: string;
537
- }
538
- interface LogoRectangleProps {
539
- type: 'combination' | 'team' | 'pro' | 'max';
540
- width: number;
541
- height: number;
542
- className?: string;
543
- }
544
- type LogoProps = LogoSquareProps | LogoRectangleProps;
545
- declare const Logo: (props: LogoProps) => react_jsx_runtime.JSX.Element;
546
-
547
- type PrimitiveCoachMarkRootProps = PopoverProps & {
548
- trigger: ReactNode;
549
- };
550
- /**
551
- * PrimitiveCoachMark Content
552
- * 사용 가능한 속성은 @radix-ui/react-popover 의 PopoverContentProps 참고
553
- * https://www.radix-ui.com/primitives/docs/components/popover#content
554
- */
555
- interface PrimitiveCoachMarkContentProps extends PopoverPrimitive.PopoverContentProps, PopoverPortalProps {
556
- dim?: boolean;
557
- }
558
- /**
559
- * @description 커스텀 스타일용 기본 CoachMark 컴포넌트
560
- * - Anchor에 색상이 들어가있지 않습니다.
561
- * - CoachMarkContent의 className을 통해 span > svg > path의 fill 값을 변경해 사용해주세요.
562
- */
563
- declare const PrimitiveCoachMark: (({ trigger, children, ...props }: PrimitiveCoachMarkRootProps) => react_jsx_runtime.JSX.Element) & {
564
- Content: react.ForwardRefExoticComponent<PrimitiveCoachMarkContentProps & react.RefAttributes<HTMLDivElement>>;
565
- Portal: react.FC<PopoverPrimitive.PopoverPortalProps>;
566
- };
567
-
568
- interface Step {
569
- total: number;
570
- current: number;
571
- }
572
- interface RestrictedButtonProps {
573
- children?: ReactNode;
574
- onClick?: MouseEventHandler<HTMLButtonElement>;
575
- }
576
-
577
- type CoachMarkProps = PrimitiveCoachMarkRootProps & {
578
- children?: ReactNode;
579
- };
580
- interface BaseCoachMarkContentProps extends Omit<PrimitiveCoachMarkContentProps, 'children'> {
581
- tag?: string;
582
- title?: string;
583
- level?: 'brand' | 'inverse-static' | 'inverse';
584
- onClose?: () => void;
585
- }
586
- type BaseCoachMarkContent = {
587
- icon?: {
588
- icon: IconComponentType;
589
- } & Pick<IconProps, 'fill' | 'thick' | 'type' | 'fillType'>;
590
- description?: string;
591
- step?: Step;
592
- primaryButton?: RestrictedButtonProps;
593
- secondaryButton?: RestrictedButtonProps;
594
- width?: number;
595
- };
596
- type WithImage = BaseCoachMarkContent & {
597
- image: React.ImgHTMLAttributes<HTMLImageElement>;
598
- illust?: undefined;
599
- };
600
- type WithIllust = BaseCoachMarkContent & {
601
- image?: undefined;
602
- illust: Omit<IllustProps, 'width'>;
603
- };
604
- type WithoutMedia = BaseCoachMarkContent & {
605
- image?: undefined;
606
- illust?: undefined;
607
- };
608
- type CoachMarkContentProps = (WithImage | WithIllust | WithoutMedia) & BaseCoachMarkContentProps;
609
- declare const CoachMark: ((props: CoachMarkProps) => react_jsx_runtime.JSX.Element) & {
610
- Content: react.ForwardRefExoticComponent<CoachMarkContentProps & react.RefAttributes<HTMLDivElement>>;
611
- Portal: react.FC<PopoverPrimitive.PopoverPortalProps>;
612
- };
613
-
614
- type CompactCoachMarkProps = PrimitiveCoachMarkRootProps;
615
- declare const CompactCoachMark: ((props: CompactCoachMarkProps) => react_jsx_runtime.JSX.Element) & {
616
- Content: react.ForwardRefExoticComponent<BaseCoachMarkContentProps & react.RefAttributes<HTMLDivElement>>;
617
- Portal: react.FC<PopoverPrimitive.PopoverPortalProps>;
618
- };
619
-
620
- interface TagProps extends Omit<IPropsNormalBold, 'type' | 'size' | 'weight'> {
621
- children: ReactNode;
622
- color?: SystemKeys;
623
- backgroundColor?: SystemKeys;
624
- borderColor?: SystemKeys;
625
- radius?: 'square' | 'rounded';
626
- thick?: boolean;
627
- size?: 's' | 'm' | 'l';
628
- }
629
- declare const Tag: react.ForwardRefExoticComponent<TagProps & react.RefAttributes<HTMLParagraphElement>>;
630
-
631
- export { type BaseCoachMarkContentProps, type BreakPointsKey, Button, type ButtonIconProps, type ButtonProps, type ButtonSizeType, Caption, Checkbox, CoachMark, type CoachMarkContentProps, type CommonButtonProps, CompactCoachMark, DefaultButton, type DefaultButtonProps, Display, type FillFalseLevelType, type FillLevelType, type FillType, Heading, type ICaptionProps, type IDisplayProps, type IHeadingProps, type IPropsAccent, type IPropsAnswer, type IPropsNormal, type IPropsNormalBold, type IPropsPost, type ITitleProps, IconButton, type IconButtonLevelType, type IconButtonProps, type IconSizeType, type ItemProps, Label, List, Loading, Logo, Media, MediaContextProvider, Paragraph, type ParagraphProps, Popover, type PopoverContentProps, PrimitiveCoachMark, type PrimitiveCoachMarkContentProps, type PrimitiveCoachMarkRootProps, Radio, Select, type SelectItemProps, type SelectProps, SingleSnackbar, Snackbar, Tag, TextButton, type TextButtonProps, Textfield, type TextfieldButtonProps, type TextfieldLabelType, type TextfieldProps, Title, Toaster, Tooltip, Typography, arrayToStyleObject, isEmptyObject, objectToArray, rootMediaStyle, snackbarAtom, useSnackbar, useToast };