@liner-fe/prism 2.4.1 → 2.4.3
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/lib/index.css +270 -0
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +94 -2
- package/lib/index.js +4840 -783
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SystemKeys, breakpointOrigin } from '@liner-fe/design-token';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import react__default, { SVGProps, ButtonHTMLAttributes, RefAttributes, HTMLAttributes, ReactNode, ComponentPropsWithoutRef, InputHTMLAttributes, ComponentProps, LiHTMLAttributes } from 'react';
|
|
3
|
+
import react__default, { SVGProps, ButtonHTMLAttributes, RefAttributes, HTMLAttributes, ReactNode, ComponentPropsWithoutRef, InputHTMLAttributes, ComponentProps, LiHTMLAttributes, MouseEventHandler } from 'react';
|
|
4
4
|
import * as cva from 'cva';
|
|
5
5
|
import { VariantProps } from 'cva';
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -8,6 +8,10 @@ import { ToastProps } from '@radix-ui/react-toast';
|
|
|
8
8
|
import * as _artsy_fresnel_dist_Media from '@artsy/fresnel/dist/Media';
|
|
9
9
|
import { TypographyCaptionPrefix, TypographyParagraphPrefix, TypographyHeadingPrefix, TypographyTitlePrefix, TypographyDisplayPrefix } from '@liner-fe/design-token-primitive';
|
|
10
10
|
import { Popover as Popover$1, Tooltip as Tooltip$1, Checkbox as Checkbox$1, RadioGroup, Slider as Slider$1, Select as Select$1, Label as Label$1 } from 'radix-ui';
|
|
11
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
12
|
+
import { PopoverProps, PopoverPortalProps } from '@radix-ui/react-popover';
|
|
13
|
+
import { ImageProps } from 'next/image';
|
|
14
|
+
import { Property } from 'csstype';
|
|
11
15
|
|
|
12
16
|
interface IconComponentProps {
|
|
13
17
|
className?: string;
|
|
@@ -531,4 +535,92 @@ interface CombinationProps {
|
|
|
531
535
|
type LogoProps = LogoDefaultProps | CombinationProps;
|
|
532
536
|
declare const Logo: (props: LogoProps) => react_jsx_runtime.JSX.Element;
|
|
533
537
|
|
|
534
|
-
|
|
538
|
+
type PrimitiveCoachMarkRootProps = PopoverProps & {
|
|
539
|
+
trigger: ReactNode;
|
|
540
|
+
};
|
|
541
|
+
/**
|
|
542
|
+
* PrimitiveCoachMark Content
|
|
543
|
+
* 사용 가능한 속성은 @radix-ui/react-popover 의 PopoverContentProps 참고
|
|
544
|
+
* https://www.radix-ui.com/primitives/docs/components/popover#content
|
|
545
|
+
*/
|
|
546
|
+
interface PrimitiveCoachMarkContentProps extends PopoverPrimitive.PopoverContentProps, PopoverPortalProps {
|
|
547
|
+
dim?: boolean;
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* @description 커스텀 스타일용 기본 CoachMark 컴포넌트
|
|
551
|
+
* - Anchor에 색상이 들어가있지 않습니다.
|
|
552
|
+
* - CoachMarkContent의 className을 통해 span > svg > path의 fill 값을 변경해 사용해주세요.
|
|
553
|
+
*/
|
|
554
|
+
declare const PrimitiveCoachMark: (({ trigger, children, ...props }: PrimitiveCoachMarkRootProps) => react_jsx_runtime.JSX.Element) & {
|
|
555
|
+
Content: react.ForwardRefExoticComponent<PrimitiveCoachMarkContentProps & react.RefAttributes<HTMLDivElement>>;
|
|
556
|
+
Portal: react.FC<PopoverPrimitive.PopoverPortalProps>;
|
|
557
|
+
};
|
|
558
|
+
|
|
559
|
+
interface Step {
|
|
560
|
+
total: number;
|
|
561
|
+
current: number;
|
|
562
|
+
}
|
|
563
|
+
interface RestrictedButtonProps {
|
|
564
|
+
children?: ReactNode;
|
|
565
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
type LightIllustType = "hero-gift" | "hero-search" | "mini-documents-2" | "mini-documents-3" | "mini-documents-4" | "mini-documents-5" | "mini-documents" | "mini-egg" | "mini-gift" | "mini-graduation_hat" | "mini-not-search" | "mini-search" | "mini-ticket" | "mini-window" | "spot-catch_star" | "spot-clap" | "spot-empty" | "spot-no_search" | "spot-search-2" | "spot-search-3" | "spot-search-4" | "spot-search-5" | "spot-search" | "spot-write";
|
|
569
|
+
type DarkIllustType = "hero-gift" | "hero-search" | "mini-documents-2" | "mini-documents-3" | "mini-documents-4" | "mini-documents-5" | "mini-documents" | "mini-egg" | "mini-gift" | "mini-graduation_hat" | "mini-not-search" | "mini-search" | "mini-ticket" | "mini-window" | "spot-catch_star" | "spot-clap" | "spot-empty" | "spot-no_search" | "spot-search-2" | "spot-search-3" | "spot-search-4" | "spot-search-5" | "spot-search" | "spot-write";
|
|
570
|
+
type IllustType = DarkIllustType | LightIllustType;
|
|
571
|
+
|
|
572
|
+
interface Source<T extends false | true = true> {
|
|
573
|
+
name: IllustType;
|
|
574
|
+
inverse?: T;
|
|
575
|
+
}
|
|
576
|
+
interface IllustProps extends Omit<ImageProps, 'alt' | 'width' | 'height' | 'fill' | 'src'> {
|
|
577
|
+
width: number;
|
|
578
|
+
src: {
|
|
579
|
+
light: Source<false>;
|
|
580
|
+
dark?: Source;
|
|
581
|
+
};
|
|
582
|
+
margin?: Property.Margin<string>;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
type CoachMarkProps = PrimitiveCoachMarkRootProps & {
|
|
586
|
+
children?: ReactNode;
|
|
587
|
+
};
|
|
588
|
+
interface BaseCoachMarkContentProps extends Omit<PrimitiveCoachMarkContentProps, 'children'> {
|
|
589
|
+
tag?: string;
|
|
590
|
+
title?: string;
|
|
591
|
+
level?: 'brand' | 'inverse-static' | 'inverse';
|
|
592
|
+
onClose?: () => void;
|
|
593
|
+
}
|
|
594
|
+
type BaseCoachMarkContent = {
|
|
595
|
+
icon?: Pick<IconProps, 'name' | 'thick' | 'fill'>;
|
|
596
|
+
description?: string;
|
|
597
|
+
step?: Step;
|
|
598
|
+
primaryButton?: RestrictedButtonProps;
|
|
599
|
+
secondaryButton?: RestrictedButtonProps;
|
|
600
|
+
width?: number;
|
|
601
|
+
};
|
|
602
|
+
type WithImage = BaseCoachMarkContent & {
|
|
603
|
+
image: React.ImgHTMLAttributes<HTMLImageElement>;
|
|
604
|
+
illust?: undefined;
|
|
605
|
+
};
|
|
606
|
+
type WithIllust = BaseCoachMarkContent & {
|
|
607
|
+
image?: undefined;
|
|
608
|
+
illust: Omit<IllustProps, 'width'>;
|
|
609
|
+
};
|
|
610
|
+
type WithoutMedia = BaseCoachMarkContent & {
|
|
611
|
+
image?: undefined;
|
|
612
|
+
illust?: undefined;
|
|
613
|
+
};
|
|
614
|
+
type CoachMarkContentProps = (WithImage | WithIllust | WithoutMedia) & BaseCoachMarkContentProps;
|
|
615
|
+
declare const CoachMark: ((props: CoachMarkProps) => react_jsx_runtime.JSX.Element) & {
|
|
616
|
+
Content: react.ForwardRefExoticComponent<CoachMarkContentProps & react.RefAttributes<HTMLDivElement>>;
|
|
617
|
+
Portal: react.FC<PopoverPrimitive.PopoverPortalProps>;
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
type CompactCoachMarkProps = PrimitiveCoachMarkRootProps;
|
|
621
|
+
declare const CompactCoachMark: ((props: CompactCoachMarkProps) => react_jsx_runtime.JSX.Element) & {
|
|
622
|
+
Content: react.ForwardRefExoticComponent<BaseCoachMarkContentProps & react.RefAttributes<HTMLDivElement>>;
|
|
623
|
+
Portal: react.FC<PopoverPrimitive.PopoverPortalProps>;
|
|
624
|
+
};
|
|
625
|
+
|
|
626
|
+
export { type BaseCoachMarkContentProps, type BasicColorType, 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 IPropsPost, type ITitleProps, Icon, IconButton, type IconButtonLevelType, type IconButtonProps, type IconColorType, type IconComponent, type IconComponentProps, type IconKey, type IconMapType, type IconProps, type IconSizeKey, 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, Slider, TextButton, type TextButtonProps, Textfield, type TextfieldButtonProps, type TextfieldLabelType, type TextfieldProps, Title, Toaster, Tooltip, Typography, arrayToStyleObject, getIconComponent, iconKeyOptions, iconMap, isEmptyObject, objectToArray, rootMediaStyle, useToast };
|