@liner-fe/prism 2.12.2 → 2.12.4
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 +174 -315
- package/lib/index.d.ts +26 -35
- package/lib/index.js +480 -523
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -20,10 +20,12 @@ declare const arrayToStyleObject: <T extends SystemKeys>(colorKeys: T[], style:
|
|
|
20
20
|
}, prefix?: string) => Partial<Record<SystemKeys, string>>;
|
|
21
21
|
declare const isEmptyObject: (obj: object) => boolean;
|
|
22
22
|
|
|
23
|
+
declare const DEFAULT_LEVEL_OPTIONS: readonly ["primary", "secondary", "tertiary", "quaternary", "quinary", "negative", "static", "inverse-static"];
|
|
24
|
+
type DefaultLevelType = (typeof DEFAULT_LEVEL_OPTIONS)[number];
|
|
25
|
+
declare const DEFAULT_SIZE_OPTIONS: readonly ["cta", "l", "m", "s"];
|
|
26
|
+
type ButtonSizeType = (typeof DEFAULT_SIZE_OPTIONS)[number];
|
|
23
27
|
declare const defaultButtonVariants: (props?: ({
|
|
24
28
|
level?: "primary" | "secondary" | "tertiary" | "quaternary" | "quinary" | "negative" | "static" | "inverse-static" | undefined;
|
|
25
|
-
fill?: boolean | undefined;
|
|
26
|
-
align?: "center" | "spaceBetween" | undefined;
|
|
27
29
|
size?: "l" | "m" | "s" | "cta" | undefined;
|
|
28
30
|
width?: "full" | "fit-content" | undefined;
|
|
29
31
|
} & ({
|
|
@@ -34,21 +36,13 @@ declare const defaultButtonVariants: (props?: ({
|
|
|
34
36
|
className?: cva.ClassValue;
|
|
35
37
|
})) | undefined) => string;
|
|
36
38
|
interface CommonButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
37
|
-
as?: 'default' | 'text';
|
|
38
39
|
asChild?: boolean;
|
|
39
40
|
}
|
|
40
|
-
type
|
|
41
|
-
|
|
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> {
|
|
41
|
+
type ButtonIconProps = Omit<IconProps, 'ref'>;
|
|
42
|
+
interface DefaultButtonProps extends CommonButtonProps, VariantProps<typeof defaultButtonVariants> {
|
|
47
43
|
asChild?: boolean;
|
|
48
|
-
level?: DefaultLevelType
|
|
49
|
-
fill?: T;
|
|
44
|
+
level?: DefaultLevelType;
|
|
50
45
|
size?: ButtonSizeType;
|
|
51
|
-
align?: 'center' | 'spaceBetween';
|
|
52
46
|
width?: 'full' | 'fit-content';
|
|
53
47
|
leftIcon?: {
|
|
54
48
|
icon: IconComponentType;
|
|
@@ -58,9 +52,9 @@ interface DefaultButtonProps<T extends FillType> extends CommonButtonProps, Vari
|
|
|
58
52
|
} & ButtonIconProps;
|
|
59
53
|
isLoading?: boolean;
|
|
60
54
|
}
|
|
61
|
-
type ButtonProps = DefaultButtonProps
|
|
62
|
-
declare const DefaultButton: react.ForwardRefExoticComponent<DefaultButtonProps
|
|
63
|
-
declare const Button: react.ForwardRefExoticComponent<
|
|
55
|
+
type ButtonProps = DefaultButtonProps;
|
|
56
|
+
declare const DefaultButton: react.ForwardRefExoticComponent<DefaultButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
57
|
+
declare const Button: react.ForwardRefExoticComponent<DefaultButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
64
58
|
|
|
65
59
|
interface IToastBase extends ToastProps, RefAttributes<HTMLLIElement> {
|
|
66
60
|
toastId: number;
|
|
@@ -317,10 +311,12 @@ declare const Tooltip: (({ children, ...props }: TooltipRootProps) => react_jsx_
|
|
|
317
311
|
Content: react__default.ForwardRefExoticComponent<TooltipContentProps & react__default.RefAttributes<HTMLDivElement>>;
|
|
318
312
|
};
|
|
319
313
|
|
|
314
|
+
declare const ICON_SIZE_OPTIONS: string[];
|
|
315
|
+
declare const ICON_LEVEL_OPTIONS: readonly ["primary", "secondary", "tertiary", "quaternary", "quinary", "static", "inverse-static"];
|
|
316
|
+
type IconButtonLevelType = (typeof ICON_LEVEL_OPTIONS)[number];
|
|
320
317
|
declare const iconButtonVariants: (props?: ({
|
|
321
|
-
level?: "primary" | "secondary" | "tertiary" | "quaternary" | "
|
|
322
|
-
size?: "l" | "m" | "s" |
|
|
323
|
-
fill?: boolean | undefined;
|
|
318
|
+
level?: "primary" | "secondary" | "tertiary" | "quaternary" | "quinary" | "static" | "inverse-static" | undefined;
|
|
319
|
+
size?: "l" | "m" | "s" | undefined;
|
|
324
320
|
} & ({
|
|
325
321
|
class?: cva.ClassValue;
|
|
326
322
|
className?: never;
|
|
@@ -328,12 +324,8 @@ declare const iconButtonVariants: (props?: ({
|
|
|
328
324
|
class?: never;
|
|
329
325
|
className?: cva.ClassValue;
|
|
330
326
|
})) | undefined) => string;
|
|
331
|
-
type IconButtonLevelType = 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'negative' | 'static' | 'inverse' | 'inverse-static';
|
|
332
|
-
type IconSizeType = 'l' | 'm' | 's' | 'xs';
|
|
333
327
|
interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof iconButtonVariants> {
|
|
334
328
|
asChild?: boolean;
|
|
335
|
-
size?: 'l' | 'm' | 's' | 'xs';
|
|
336
|
-
fill?: boolean;
|
|
337
329
|
level?: IconButtonLevelType;
|
|
338
330
|
icon: {
|
|
339
331
|
icon: IconComponentType;
|
|
@@ -365,7 +357,7 @@ declare const defaultTextfieldVariants: (props?: ({
|
|
|
365
357
|
class?: never;
|
|
366
358
|
className?: cva.ClassValue;
|
|
367
359
|
})) | undefined) => string;
|
|
368
|
-
type TextfieldButtonProps = Omit<DefaultButtonProps
|
|
360
|
+
type TextfieldButtonProps = Omit<DefaultButtonProps, 'size'>;
|
|
369
361
|
type TextfieldLabelType = 'in' | 'out' | 'visually-hidden';
|
|
370
362
|
interface TextfieldLabelProps {
|
|
371
363
|
text: string;
|
|
@@ -500,10 +492,13 @@ interface LabelProps extends ComponentPropsWithoutRef<typeof Label$1.Root>, Vari
|
|
|
500
492
|
}
|
|
501
493
|
declare const Label: react.ForwardRefExoticComponent<LabelProps & react.RefAttributes<HTMLLabelElement>>;
|
|
502
494
|
|
|
495
|
+
declare const TEXT_LEVEL_OPTIONS: readonly ["primary", "secondary", "tertiary"];
|
|
496
|
+
type TextLevelType = (typeof TEXT_LEVEL_OPTIONS)[number];
|
|
497
|
+
declare const TEXT_SIZE_OPTIONS: readonly ["m", "s", "xs"];
|
|
498
|
+
type TextSizeType = (typeof TEXT_SIZE_OPTIONS)[number];
|
|
503
499
|
declare const textButtonVariants: (props?: ({
|
|
504
|
-
level?: "primary" | "secondary" | "tertiary" |
|
|
505
|
-
size?: "m" | "s" | undefined;
|
|
506
|
-
thick?: boolean | undefined;
|
|
500
|
+
level?: "primary" | "secondary" | "tertiary" | undefined;
|
|
501
|
+
size?: "m" | "s" | "xs" | undefined;
|
|
507
502
|
underline?: boolean | undefined;
|
|
508
503
|
} & ({
|
|
509
504
|
class?: cva.ClassValue;
|
|
@@ -512,20 +507,16 @@ declare const textButtonVariants: (props?: ({
|
|
|
512
507
|
class?: never;
|
|
513
508
|
className?: cva.ClassValue;
|
|
514
509
|
})) | undefined) => string;
|
|
515
|
-
type TextLevelType = 'primary' | 'secondary' | 'tertiary' | 'inverse' | 'inverse-static';
|
|
516
|
-
type TextButtonSizeType = Extract<ButtonSizeType, 'm' | 's'>;
|
|
517
510
|
interface TextButtonProps extends CommonButtonProps, VariantProps<typeof textButtonVariants> {
|
|
518
511
|
asChild?: boolean;
|
|
519
512
|
level?: TextLevelType;
|
|
520
|
-
thick?: boolean;
|
|
521
513
|
underline?: boolean;
|
|
522
|
-
size?: TextButtonSizeType;
|
|
523
514
|
leftIcon?: {
|
|
524
515
|
icon: IconComponentType;
|
|
525
|
-
} &
|
|
516
|
+
} & Omit<IconProps, 'ref'>;
|
|
526
517
|
rightIcon?: {
|
|
527
518
|
icon: IconComponentType;
|
|
528
|
-
} &
|
|
519
|
+
} & Omit<IconProps, 'ref'>;
|
|
529
520
|
}
|
|
530
521
|
declare const TextButton: react.ForwardRefExoticComponent<TextButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
531
522
|
|
|
@@ -590,7 +581,7 @@ type CoachMarkProps = PrimitiveCoachMarkRootProps & {
|
|
|
590
581
|
interface BaseCoachMarkContentProps extends Omit<PrimitiveCoachMarkContentProps, 'children'> {
|
|
591
582
|
tag?: string;
|
|
592
583
|
title?: string;
|
|
593
|
-
level?: 'brand' | 'inverse-static'
|
|
584
|
+
level?: 'brand' | 'inverse-static';
|
|
594
585
|
onClose?: MouseEventHandler<HTMLOrSVGElement>;
|
|
595
586
|
}
|
|
596
587
|
type BaseCoachMarkContent = {
|
|
@@ -638,4 +629,4 @@ interface TagProps extends Omit<IPropsNormalBold, 'type' | 'size' | 'weight'> {
|
|
|
638
629
|
}
|
|
639
630
|
declare const Tag: react.ForwardRefExoticComponent<TagProps & react.RefAttributes<HTMLParagraphElement>>;
|
|
640
631
|
|
|
641
|
-
export { type BaseCoachMarkContentProps, type BreakPointsKey, Button, type ButtonIconProps, type ButtonProps, type ButtonSizeType, Caption, Checkbox, CoachMark, type CoachMarkContentProps, type CommonButtonProps, CompactCoachMark,
|
|
632
|
+
export { type BaseCoachMarkContentProps, type BreakPointsKey, Button, type ButtonIconProps, type ButtonProps, type ButtonSizeType, Caption, Checkbox, CoachMark, type CoachMarkContentProps, type CommonButtonProps, CompactCoachMark, DEFAULT_LEVEL_OPTIONS, DEFAULT_SIZE_OPTIONS, DefaultButton, type DefaultButtonProps, type DefaultLevelType, Display, Heading, ICON_LEVEL_OPTIONS, ICON_SIZE_OPTIONS, type ICaptionProps, type IDisplayProps, type IHeadingProps, type IPropsAccent, type IPropsAnswer, type IPropsNormal, type IPropsNormalBold, type IPropsPost, type ITitleProps, IconButton, type IconButtonProps, type ItemProps, Label, List, Loading, type LoadingLevelType, Logo, Media, MediaContextProvider, Paragraph, type ParagraphProps, Popover, type PopoverContentProps, PrimitiveCoachMark, type PrimitiveCoachMarkContentProps, type PrimitiveCoachMarkRootProps, Radio, Select, type SelectItemProps, type SelectProps, SingleSnackbar, Snackbar, TEXT_LEVEL_OPTIONS, TEXT_SIZE_OPTIONS, Tag, TextButton, type TextButtonProps, type TextSizeType, Textfield, type TextfieldButtonProps, type TextfieldLabelType, type TextfieldProps, Title, Toaster, Tooltip, Typography, arrayToStyleObject, isEmptyObject, objectToArray, rootMediaStyle, snackbarAtom, useSnackbar, useToast };
|