@liner-fe/prism 3.0.9 → 3.0.10
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 +62 -0
- package/lib/index.d.ts +26 -1
- package/lib/index.js +149 -0
- package/package.json +5 -5
package/lib/index.css
CHANGED
|
@@ -1967,3 +1967,65 @@
|
|
|
1967
1967
|
position: absolute;
|
|
1968
1968
|
transform: translateX(-5.7%);
|
|
1969
1969
|
}
|
|
1970
|
+
|
|
1971
|
+
/* esbuild-sass-plugin:css-chunk:src/components/Badge/style.module.scss */
|
|
1972
|
+
._badge_f8fzb_1 {
|
|
1973
|
+
display: inline-flex;
|
|
1974
|
+
align-items: center;
|
|
1975
|
+
justify-content: center;
|
|
1976
|
+
white-space: nowrap;
|
|
1977
|
+
box-sizing: border-box;
|
|
1978
|
+
gap: var(--lp-sys-padding-component-50);
|
|
1979
|
+
}
|
|
1980
|
+
._s_f8fzb_10 {
|
|
1981
|
+
padding: var(--lp-sys-padding-component-50) var(--lp-sys-padding-component-100);
|
|
1982
|
+
border-radius: var(--lp-sys-radius-xs);
|
|
1983
|
+
}
|
|
1984
|
+
._m_f8fzb_15 {
|
|
1985
|
+
padding: var(--lp-sys-padding-component-50) var(--lp-sys-padding-component-100);
|
|
1986
|
+
border-radius: var(--lp-sys-radius-xs);
|
|
1987
|
+
}
|
|
1988
|
+
._l_f8fzb_20 {
|
|
1989
|
+
padding: var(--lp-sys-padding-component-100) var(--lp-sys-padding-component-150);
|
|
1990
|
+
border-radius: var(--lp-sys-radius-s);
|
|
1991
|
+
}
|
|
1992
|
+
._text_f8fzb_25 {
|
|
1993
|
+
padding: 0 var(--lp-sys-padding-component-50);
|
|
1994
|
+
}
|
|
1995
|
+
._subtle_f8fzb_29 {
|
|
1996
|
+
background: var(--neutral-fill-overlay-mid);
|
|
1997
|
+
}
|
|
1998
|
+
._outlined_f8fzb_33 {
|
|
1999
|
+
background: var(--neutral-fill-opaque-lowest);
|
|
2000
|
+
border: 1px solid var(--neutral-border-overlay-subtle);
|
|
2001
|
+
}
|
|
2002
|
+
._fill-primary_f8fzb_38 {
|
|
2003
|
+
background: var(--brand-fill-low);
|
|
2004
|
+
}
|
|
2005
|
+
._fill-accent_f8fzb_42 {
|
|
2006
|
+
background: var(--accent-fill-primary);
|
|
2007
|
+
}
|
|
2008
|
+
._inverse-primary_f8fzb_46 {
|
|
2009
|
+
background: var(--brandinverse-fill-static-low);
|
|
2010
|
+
}
|
|
2011
|
+
._text-neutral_f8fzb_50 {
|
|
2012
|
+
color: var(--neutral-label-primary);
|
|
2013
|
+
}
|
|
2014
|
+
._text-neutral-secondary_f8fzb_54 {
|
|
2015
|
+
color: var(--neutral-label-secondary);
|
|
2016
|
+
}
|
|
2017
|
+
._text-primary_f8fzb_58 {
|
|
2018
|
+
color: var(--brand-label-primary);
|
|
2019
|
+
}
|
|
2020
|
+
._text-primary-inverse_f8fzb_62 {
|
|
2021
|
+
color: var(--brandinverse-label-static-primary);
|
|
2022
|
+
}
|
|
2023
|
+
._text-caution_f8fzb_66 {
|
|
2024
|
+
color: var(--function-label-caution);
|
|
2025
|
+
}
|
|
2026
|
+
._text-error_f8fzb_70 {
|
|
2027
|
+
color: var(--function-label-negative);
|
|
2028
|
+
}
|
|
2029
|
+
._text-accent_f8fzb_74 {
|
|
2030
|
+
color: var(--accent-label-primary);
|
|
2031
|
+
}
|
package/lib/index.d.ts
CHANGED
|
@@ -631,4 +631,29 @@ interface TagProps extends Omit<IPropsNormalBold, 'type' | 'size' | 'weight'> {
|
|
|
631
631
|
}
|
|
632
632
|
declare const Tag: react.ForwardRefExoticComponent<TagProps & react.RefAttributes<HTMLParagraphElement>>;
|
|
633
633
|
|
|
634
|
-
|
|
634
|
+
type BadgeSize = 's' | 'm' | 'l';
|
|
635
|
+
type BadgeIconProps = {
|
|
636
|
+
icon: IconComponentType;
|
|
637
|
+
} & Pick<IconProps, 'fill' | 'thick' | 'type' | 'fillType'>;
|
|
638
|
+
type BadgeVariant = 'subtle' | 'outlined' | 'fill' | 'inverse';
|
|
639
|
+
type BadgeColor = 'neutral' | 'neutral-secondary' | 'primary' | 'caution' | 'error' | 'accent';
|
|
640
|
+
type BadgeVariantColorProps = {
|
|
641
|
+
variant?: 'fill';
|
|
642
|
+
color?: 'primary' | 'accent';
|
|
643
|
+
} | {
|
|
644
|
+
variant: 'subtle' | 'outlined';
|
|
645
|
+
color?: Exclude<BadgeColor, 'accent'>;
|
|
646
|
+
} | {
|
|
647
|
+
variant: 'inverse';
|
|
648
|
+
color?: 'primary';
|
|
649
|
+
};
|
|
650
|
+
type BadgeBaseProps = ComponentPropsWithoutRef<'span'> & {
|
|
651
|
+
size?: BadgeSize;
|
|
652
|
+
thick?: boolean;
|
|
653
|
+
leftIcon?: BadgeIconProps;
|
|
654
|
+
rightIcon?: BadgeIconProps;
|
|
655
|
+
};
|
|
656
|
+
type BadgeProps = BadgeBaseProps & BadgeVariantColorProps;
|
|
657
|
+
declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
|
|
658
|
+
|
|
659
|
+
export { Badge, type BadgeColor, type BadgeIconProps, type BadgeProps, type BadgeSize, type BadgeVariant, 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 };
|
package/lib/index.js
CHANGED
|
@@ -3538,7 +3538,156 @@ var CoachMark = Object.assign(CoachMarkRoot, {
|
|
|
3538
3538
|
Content: CoachMarkContent,
|
|
3539
3539
|
Portal: PopoverPrimitive4.Portal
|
|
3540
3540
|
});
|
|
3541
|
+
|
|
3542
|
+
// src/components/Badge/index.tsx
|
|
3543
|
+
import { forwardRef as forwardRef20 } from "react";
|
|
3544
|
+
|
|
3545
|
+
// src/components/Badge/style.module.scss
|
|
3546
|
+
var style_module_default22 = {
|
|
3547
|
+
"badge": "_badge_f8fzb_1",
|
|
3548
|
+
"s": "_s_f8fzb_10",
|
|
3549
|
+
"m": "_m_f8fzb_15",
|
|
3550
|
+
"l": "_l_f8fzb_20",
|
|
3551
|
+
"text": "_text_f8fzb_25",
|
|
3552
|
+
"subtle": "_subtle_f8fzb_29",
|
|
3553
|
+
"outlined": "_outlined_f8fzb_33",
|
|
3554
|
+
"fill-primary": "_fill-primary_f8fzb_38",
|
|
3555
|
+
"fill-accent": "_fill-accent_f8fzb_42",
|
|
3556
|
+
"inverse-primary": "_inverse-primary_f8fzb_46",
|
|
3557
|
+
"text-neutral": "_text-neutral_f8fzb_50",
|
|
3558
|
+
"text-neutral-secondary": "_text-neutral-secondary_f8fzb_54",
|
|
3559
|
+
"text-primary": "_text-primary_f8fzb_58",
|
|
3560
|
+
"text-primary-inverse": "_text-primary-inverse_f8fzb_62",
|
|
3561
|
+
"text-caution": "_text-caution_f8fzb_66",
|
|
3562
|
+
"text-error": "_text-error_f8fzb_70",
|
|
3563
|
+
"text-accent": "_text-accent_f8fzb_74"
|
|
3564
|
+
};
|
|
3565
|
+
|
|
3566
|
+
// src/components/Badge/index.tsx
|
|
3567
|
+
import { cva as cva13 } from "cva";
|
|
3568
|
+
import clsx23 from "clsx";
|
|
3569
|
+
import { jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3570
|
+
var badgeSizeIconSizeMap = {
|
|
3571
|
+
s: "xxs",
|
|
3572
|
+
m: "xs",
|
|
3573
|
+
l: "xs"
|
|
3574
|
+
};
|
|
3575
|
+
var badgeSizeTypoMap = {
|
|
3576
|
+
s: ["lp-sys-typo-caption3-normal-regular", "lp-sys-typo-caption3-normal-medium"],
|
|
3577
|
+
m: ["lp-sys-typo-caption2-normal-regular", "lp-sys-typo-caption2-normal-medium"],
|
|
3578
|
+
l: ["lp-sys-typo-caption1-normal-regular", "lp-sys-typo-caption1-normal-medium"]
|
|
3579
|
+
};
|
|
3580
|
+
var badgeBase = cva13({
|
|
3581
|
+
base: style_module_default22.badge,
|
|
3582
|
+
variants: {
|
|
3583
|
+
size: {
|
|
3584
|
+
s: style_module_default22.s,
|
|
3585
|
+
m: style_module_default22.m,
|
|
3586
|
+
l: style_module_default22.l
|
|
3587
|
+
}
|
|
3588
|
+
}
|
|
3589
|
+
});
|
|
3590
|
+
function getBgClass(variant, color) {
|
|
3591
|
+
if (variant === "subtle") return style_module_default22.subtle;
|
|
3592
|
+
if (variant === "outlined") return style_module_default22.outlined;
|
|
3593
|
+
if (variant === "fill") return color === "accent" ? style_module_default22["fill-accent"] : style_module_default22["fill-primary"];
|
|
3594
|
+
return style_module_default22["inverse-primary"];
|
|
3595
|
+
}
|
|
3596
|
+
__name(getBgClass, "getBgClass");
|
|
3597
|
+
function getIconType(variant, color) {
|
|
3598
|
+
if (variant === "inverse") return "brandinverse-label-static-primary";
|
|
3599
|
+
switch (color) {
|
|
3600
|
+
case "neutral":
|
|
3601
|
+
return "neutral-label-primary";
|
|
3602
|
+
case "neutral-secondary":
|
|
3603
|
+
return "neutral-label-secondary";
|
|
3604
|
+
case "primary":
|
|
3605
|
+
return "brand-label-primary";
|
|
3606
|
+
case "caution":
|
|
3607
|
+
return "function-label-caution";
|
|
3608
|
+
case "error":
|
|
3609
|
+
return "function-label-negative";
|
|
3610
|
+
case "accent":
|
|
3611
|
+
return "accent-label-primary";
|
|
3612
|
+
default:
|
|
3613
|
+
return "neutral-label-primary";
|
|
3614
|
+
}
|
|
3615
|
+
}
|
|
3616
|
+
__name(getIconType, "getIconType");
|
|
3617
|
+
function getTextClass(variant, color) {
|
|
3618
|
+
if (variant === "inverse") return style_module_default22["text-primary-inverse"];
|
|
3619
|
+
switch (color) {
|
|
3620
|
+
case "neutral":
|
|
3621
|
+
return style_module_default22["text-neutral"];
|
|
3622
|
+
case "neutral-secondary":
|
|
3623
|
+
return style_module_default22["text-neutral-secondary"];
|
|
3624
|
+
case "primary":
|
|
3625
|
+
return style_module_default22["text-primary"];
|
|
3626
|
+
case "caution":
|
|
3627
|
+
return style_module_default22["text-caution"];
|
|
3628
|
+
case "error":
|
|
3629
|
+
return style_module_default22["text-error"];
|
|
3630
|
+
case "accent":
|
|
3631
|
+
return style_module_default22["text-accent"];
|
|
3632
|
+
default:
|
|
3633
|
+
return style_module_default22["text-neutral"];
|
|
3634
|
+
}
|
|
3635
|
+
}
|
|
3636
|
+
__name(getTextClass, "getTextClass");
|
|
3637
|
+
var Badge2 = forwardRef20(
|
|
3638
|
+
({
|
|
3639
|
+
size = "s",
|
|
3640
|
+
variant = "fill",
|
|
3641
|
+
color = "primary",
|
|
3642
|
+
thick = false,
|
|
3643
|
+
className,
|
|
3644
|
+
children,
|
|
3645
|
+
leftIcon,
|
|
3646
|
+
rightIcon,
|
|
3647
|
+
...rest
|
|
3648
|
+
}, ref) => {
|
|
3649
|
+
const iconSize = badgeSizeIconSizeMap[size];
|
|
3650
|
+
const typoClass = badgeSizeTypoMap[size][+thick];
|
|
3651
|
+
const resolvedVariant = variant;
|
|
3652
|
+
const resolvedColor = color;
|
|
3653
|
+
return /* @__PURE__ */ jsxs17(
|
|
3654
|
+
"span",
|
|
3655
|
+
{
|
|
3656
|
+
ref,
|
|
3657
|
+
className: clsx23(
|
|
3658
|
+
badgeBase({ size }),
|
|
3659
|
+
typoClass,
|
|
3660
|
+
getBgClass(resolvedVariant, resolvedColor),
|
|
3661
|
+
getTextClass(resolvedVariant, resolvedColor),
|
|
3662
|
+
className
|
|
3663
|
+
),
|
|
3664
|
+
...rest,
|
|
3665
|
+
children: [
|
|
3666
|
+
!!leftIcon && /* @__PURE__ */ jsx31(
|
|
3667
|
+
leftIcon.icon,
|
|
3668
|
+
{
|
|
3669
|
+
size: iconSize,
|
|
3670
|
+
type: getIconType(resolvedVariant, resolvedColor),
|
|
3671
|
+
...leftIcon
|
|
3672
|
+
}
|
|
3673
|
+
),
|
|
3674
|
+
/* @__PURE__ */ jsx31("span", { className: style_module_default22.text, children }),
|
|
3675
|
+
!!rightIcon && /* @__PURE__ */ jsx31(
|
|
3676
|
+
rightIcon.icon,
|
|
3677
|
+
{
|
|
3678
|
+
size: iconSize,
|
|
3679
|
+
type: getIconType(resolvedVariant, resolvedColor),
|
|
3680
|
+
...rightIcon
|
|
3681
|
+
}
|
|
3682
|
+
)
|
|
3683
|
+
]
|
|
3684
|
+
}
|
|
3685
|
+
);
|
|
3686
|
+
}
|
|
3687
|
+
);
|
|
3688
|
+
Badge2.displayName = "Badge";
|
|
3541
3689
|
export {
|
|
3690
|
+
Badge2 as Badge,
|
|
3542
3691
|
Button,
|
|
3543
3692
|
Caption,
|
|
3544
3693
|
Checkbox,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liner-fe/prism",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"dependencies": {
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"react": "^19.1.0",
|
|
17
17
|
"react-dom": "^19.1.0",
|
|
18
18
|
"jotai": "^2.11.0",
|
|
19
|
-
"@liner-fe/design-token": "^3.0.
|
|
20
|
-
"@liner-fe/
|
|
21
|
-
"@liner-fe/
|
|
22
|
-
"@liner-fe/
|
|
19
|
+
"@liner-fe/design-token": "^3.0.2",
|
|
20
|
+
"@liner-fe/design-token-primitive": "^0.2.47",
|
|
21
|
+
"@liner-fe/icon": "^1.0.4",
|
|
22
|
+
"@liner-fe/illust": "^1.0.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@chromatic-com/storybook": "^1.5.0",
|