@liner-fe/prism 1.6.17 → 1.6.18
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
3
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
4
4
|
import { IconProps } from '../Icon';
|
|
5
5
|
/**
|
|
6
6
|
* PopoverRoot
|
|
@@ -19,7 +19,7 @@ interface PopoverTriggerProps {
|
|
|
19
19
|
/**
|
|
20
20
|
* PopoverContent
|
|
21
21
|
*/
|
|
22
|
-
export interface PopoverContentProps {
|
|
22
|
+
export interface PopoverContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
23
23
|
level?: 'primary' | 'secondary';
|
|
24
24
|
tag?: string;
|
|
25
25
|
icon?: Pick<IconProps, 'name' | 'thick' | 'fill'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
|
-
interface TooltipContentProps {
|
|
3
|
+
interface TooltipContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
description?: string;
|
|
6
6
|
position?: 'top' | 'right' | 'bottom' | 'left';
|
package/lib/index.mjs
CHANGED
|
@@ -3281,10 +3281,28 @@ var iconVariants = cva(style_module_default2.icon, {
|
|
|
3281
3281
|
});
|
|
3282
3282
|
var getIconComponent = /* @__PURE__ */ __name((iconKey, map) => map[iconKey], "getIconComponent");
|
|
3283
3283
|
var Icon = /* @__PURE__ */ __name((props) => {
|
|
3284
|
-
const {
|
|
3284
|
+
const {
|
|
3285
|
+
name,
|
|
3286
|
+
type = "neutralLabelPrimary",
|
|
3287
|
+
size = "m",
|
|
3288
|
+
color,
|
|
3289
|
+
thick = false,
|
|
3290
|
+
fill = false,
|
|
3291
|
+
className,
|
|
3292
|
+
...rest
|
|
3293
|
+
} = props;
|
|
3285
3294
|
const IconComponent = getIconComponent(name, iconMap);
|
|
3286
3295
|
const iconSize = iconSizeMap[size];
|
|
3287
|
-
return color ? /* @__PURE__ */ jsx64(IconComponent, { ...rest, color, size: iconSize, thick, fill }) : /* @__PURE__ */ jsx64(
|
|
3296
|
+
return color ? /* @__PURE__ */ jsx64(IconComponent, { ...rest, color, size: iconSize, thick, fill }) : /* @__PURE__ */ jsx64(
|
|
3297
|
+
IconComponent,
|
|
3298
|
+
{
|
|
3299
|
+
...rest,
|
|
3300
|
+
className: clsx(iconVariants({ type }), className),
|
|
3301
|
+
size: iconSize,
|
|
3302
|
+
thick,
|
|
3303
|
+
fill
|
|
3304
|
+
}
|
|
3305
|
+
);
|
|
3288
3306
|
}, "Icon");
|
|
3289
3307
|
|
|
3290
3308
|
// src/components/Button/index.tsx
|
|
@@ -3359,18 +3377,27 @@ var DefaultButton = forwardRef(
|
|
|
3359
3377
|
align = "center",
|
|
3360
3378
|
size = "cta",
|
|
3361
3379
|
width = "fit-content",
|
|
3380
|
+
className,
|
|
3362
3381
|
...rest
|
|
3363
3382
|
}, ref) => {
|
|
3364
|
-
return /* @__PURE__ */ jsx65(
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3383
|
+
return /* @__PURE__ */ jsx65(
|
|
3384
|
+
"button",
|
|
3385
|
+
{
|
|
3386
|
+
...rest,
|
|
3387
|
+
className: clsx2(defaultButtonVariants({ level, fill, align, size, width }), className),
|
|
3388
|
+
ref,
|
|
3389
|
+
children: /* @__PURE__ */ jsxs46("span", { className: clsx2(defaultButtonChildrenVariants({ size })), children: [
|
|
3390
|
+
rest.leftIcon && /* @__PURE__ */ jsx65(Icon, { name: rest.leftIcon, size: buttonIconSizeMap[size], thick: buttonSizeIconThickMap[size] }),
|
|
3391
|
+
/* @__PURE__ */ jsx65("p", { className: style_module_default.content, children: rest.children }),
|
|
3392
|
+
rest.rightIcon && /* @__PURE__ */ jsx65(Icon, { name: rest.rightIcon, size: buttonIconSizeMap[size], thick: buttonSizeIconThickMap[size] })
|
|
3393
|
+
] })
|
|
3394
|
+
}
|
|
3395
|
+
);
|
|
3369
3396
|
}
|
|
3370
3397
|
);
|
|
3371
3398
|
var TextButton = forwardRef(
|
|
3372
|
-
({ level = "inversePrimary", ...rest }, ref) => {
|
|
3373
|
-
return /* @__PURE__ */ jsx65("button", { ...rest, className: clsx2(textButtonVariants({ level })), ref });
|
|
3399
|
+
({ level = "inversePrimary", className, ...rest }, ref) => {
|
|
3400
|
+
return /* @__PURE__ */ jsx65("button", { ...rest, className: clsx2(textButtonVariants({ level }), className), ref });
|
|
3374
3401
|
}
|
|
3375
3402
|
);
|
|
3376
3403
|
var Button = forwardRef((props, ref) => {
|
|
@@ -3603,6 +3630,7 @@ var PopoverContent = React.forwardRef(
|
|
|
3603
3630
|
confirmText,
|
|
3604
3631
|
onConfirm,
|
|
3605
3632
|
onClose,
|
|
3633
|
+
className,
|
|
3606
3634
|
...props
|
|
3607
3635
|
}, ref) => /* @__PURE__ */ jsx72(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsxs48(
|
|
3608
3636
|
PopoverPrimitive.Content,
|
|
@@ -3611,7 +3639,7 @@ var PopoverContent = React.forwardRef(
|
|
|
3611
3639
|
align,
|
|
3612
3640
|
side: position,
|
|
3613
3641
|
sideOffset: DEFAULT_OFFSET,
|
|
3614
|
-
className: clsx8(popoverVariants({ level })),
|
|
3642
|
+
className: clsx8(popoverVariants({ level }), className),
|
|
3615
3643
|
...props,
|
|
3616
3644
|
children: [
|
|
3617
3645
|
/* @__PURE__ */ jsxs48("div", { className: style_module_default4.contentContainer, children: [
|
|
@@ -3631,7 +3659,17 @@ var PopoverContent = React.forwardRef(
|
|
|
3631
3659
|
)
|
|
3632
3660
|
] }),
|
|
3633
3661
|
/* @__PURE__ */ jsx72("p", { className: popoverSubtitleVariants(), children: subTitle }),
|
|
3634
|
-
onConfirm && /* @__PURE__ */ jsx72("div", { className: popoverFooterVariants(), children: /* @__PURE__ */ jsx72(
|
|
3662
|
+
onConfirm && /* @__PURE__ */ jsx72("div", { className: popoverFooterVariants(), children: /* @__PURE__ */ jsx72(
|
|
3663
|
+
Button,
|
|
3664
|
+
{
|
|
3665
|
+
as: "text",
|
|
3666
|
+
level: "inversePrimary",
|
|
3667
|
+
onClick: () => {
|
|
3668
|
+
onConfirm?.();
|
|
3669
|
+
},
|
|
3670
|
+
children: confirmText
|
|
3671
|
+
}
|
|
3672
|
+
) })
|
|
3635
3673
|
] }),
|
|
3636
3674
|
/* @__PURE__ */ jsx72(PopoverPrimitive.Arrow, { asChild: true, children: /* @__PURE__ */ jsx72(PopoverAnchor, { className: clsx8(popoverAnchorVariants({ level })) }) })
|
|
3637
3675
|
]
|
|
@@ -3657,6 +3695,7 @@ var style_module_default5 = {
|
|
|
3657
3695
|
|
|
3658
3696
|
// src/components/Tooltip/index.tsx
|
|
3659
3697
|
import { cva as cva4 } from "class-variance-authority";
|
|
3698
|
+
import clsx9 from "clsx";
|
|
3660
3699
|
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
3661
3700
|
var DEFAULT_OFFSET2 = 4;
|
|
3662
3701
|
var tooltipVariants = cva4([style_module_default5.tooltip, "lp-sys-typo-caption1-normal-medium"]);
|
|
@@ -3664,13 +3703,13 @@ var TooltipProvider = TooltipPrimitive.Provider;
|
|
|
3664
3703
|
var TooltipRoot = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ jsx73(TooltipPrimitive.Root, { delayDuration: 0, children }), "TooltipRoot");
|
|
3665
3704
|
var TooltipTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ jsx73(TooltipPrimitive.Trigger, { asChild: true, children: by }), "TooltipTrigger");
|
|
3666
3705
|
var TooltipContent = forwardRef3(
|
|
3667
|
-
({ description, position, ...props }, ref) => /* @__PURE__ */ jsx73(
|
|
3706
|
+
({ description, position = "top", className, ...props }, ref) => /* @__PURE__ */ jsx73(
|
|
3668
3707
|
TooltipPrimitive.Content,
|
|
3669
3708
|
{
|
|
3670
3709
|
ref,
|
|
3671
3710
|
side: position,
|
|
3672
3711
|
sideOffset: DEFAULT_OFFSET2,
|
|
3673
|
-
className: tooltipVariants(),
|
|
3712
|
+
className: clsx9(tooltipVariants(), className),
|
|
3674
3713
|
...props,
|
|
3675
3714
|
children: /* @__PURE__ */ jsx73("p", { className: style_module_default5.tooltipContent, children: description })
|
|
3676
3715
|
}
|
|
@@ -3685,7 +3724,7 @@ var Tooltip = Object.assign(TooltipRoot, {
|
|
|
3685
3724
|
// src/components/IconButton/index.tsx
|
|
3686
3725
|
import { cva as cva5 } from "class-variance-authority";
|
|
3687
3726
|
import { forwardRef as forwardRef4 } from "react";
|
|
3688
|
-
import
|
|
3727
|
+
import clsx10 from "clsx";
|
|
3689
3728
|
|
|
3690
3729
|
// src/components/IconButton/style.module.scss
|
|
3691
3730
|
var style_module_default6 = {
|
|
@@ -3730,9 +3769,9 @@ var iconButtonVariants = cva5([style_module_default6.iconButton], {
|
|
|
3730
3769
|
}
|
|
3731
3770
|
});
|
|
3732
3771
|
var IconButton = forwardRef4(
|
|
3733
|
-
({ asChild, level = "primary", name, thick = false, fill = false, size = "m", ...rest }, ref) => {
|
|
3772
|
+
({ asChild, level = "primary", name, thick = false, fill = false, size = "m", className, ...rest }, ref) => {
|
|
3734
3773
|
const Comp = asChild ? Slot2 : "button";
|
|
3735
|
-
return /* @__PURE__ */ jsx74(Comp, { ...rest, className:
|
|
3774
|
+
return /* @__PURE__ */ jsx74(Comp, { ...rest, className: clsx10(iconButtonVariants({ level, size }), className), ref, children: /* @__PURE__ */ jsx74(Icon, { name, thick, fill, size: iconButtonSizeIconSizeMap[size] }) });
|
|
3736
3775
|
}
|
|
3737
3776
|
);
|
|
3738
3777
|
export {
|