@liner-fe/prism 2.1.30 → 2.1.31

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,13 +1,19 @@
1
1
  import { ButtonHTMLAttributes } from 'react';
2
- import { VariantProps } from 'class-variance-authority';
2
+ import { VariantProps } from 'cva';
3
3
  import { IconProps } from '../Icon';
4
4
  declare const defaultButtonVariants: (props?: ({
5
- level?: "primary" | "secondary" | "tertiary" | "quaternary" | "negative" | "static" | "inverse-static" | null | undefined;
6
- fill?: boolean | null | undefined;
7
- align?: "center" | "spaceBetween" | null | undefined;
8
- size?: "m" | "s" | "l" | "cta" | null | undefined;
9
- width?: "fit-content" | "full" | null | undefined;
10
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
5
+ level?: "primary" | "secondary" | "tertiary" | "quaternary" | "negative" | "static" | "inverse-static" | undefined;
6
+ fill?: boolean | undefined;
7
+ align?: "center" | "spaceBetween" | undefined;
8
+ size?: "m" | "s" | "l" | "cta" | undefined;
9
+ width?: "fit-content" | "full" | undefined;
10
+ } & ({
11
+ class?: import("cva").ClassValue;
12
+ className?: never;
13
+ } | {
14
+ class?: never;
15
+ className?: import("cva").ClassValue;
16
+ })) | undefined) => string;
11
17
  export interface CommonButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
12
18
  as?: 'default' | 'text';
13
19
  asChild?: boolean;
@@ -1,4 +1,4 @@
1
- import { VariantProps } from 'class-variance-authority';
1
+ import { VariantProps } from 'cva';
2
2
  import { IconKey, IconMapType } from '../../type';
3
3
  import { SystemKeys } from '@liner-fe/design-token';
4
4
  import { BasicColorType } from '../../types/color';
@@ -12,9 +12,15 @@ declare const iconSizeMap: {
12
12
  export declare const iconKeyOptions: IconKey[];
13
13
  export declare const colorKeys: BasicColorType[];
14
14
  declare const iconVariants: (props?: ({
15
- type?: BasicColorType | null | undefined;
16
- fillType?: BasicColorType | null | undefined;
17
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
15
+ type?: BasicColorType | undefined;
16
+ fillType?: BasicColorType | undefined;
17
+ } & ({
18
+ class?: import("cva").ClassValue;
19
+ className?: never;
20
+ } | {
21
+ class?: never;
22
+ className?: import("cva").ClassValue;
23
+ })) | undefined) => string;
18
24
  export declare const getIconComponent: (iconKey: IconKey, map: IconMapType) => import("../../type").IconComponent;
19
25
  export type IconSizeKey = keyof typeof iconSizeMap;
20
26
  export type IconColorType = Extract<SystemKeys, BasicColorType>;
@@ -1,11 +1,17 @@
1
- import { VariantProps } from 'class-variance-authority';
1
+ import { VariantProps } from 'cva';
2
2
  import { ButtonHTMLAttributes } from 'react';
3
3
  import { IconProps } from '../Icon';
4
4
  declare const iconButtonVariants: (props?: ({
5
- level?: "primary" | "secondary" | "tertiary" | "quaternary" | "negative" | "static" | "inverse" | "inverse-static" | null | undefined;
6
- size?: "m" | "s" | "xs" | "l" | null | undefined;
7
- fill?: boolean | null | undefined;
8
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
5
+ level?: "primary" | "secondary" | "tertiary" | "quaternary" | "negative" | "static" | "inverse" | "inverse-static" | undefined;
6
+ size?: "m" | "s" | "xs" | "l" | undefined;
7
+ fill?: boolean | undefined;
8
+ } & ({
9
+ class?: import("cva").ClassValue;
10
+ className?: never;
11
+ } | {
12
+ class?: never;
13
+ className?: import("cva").ClassValue;
14
+ })) | undefined) => string;
9
15
  export type IconButtonLevelType = 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'negative' | 'static' | 'inverse' | 'inverse-static';
10
16
  export type IconSizeType = 'l' | 'm' | 's' | 'xs';
11
17
  export interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof iconButtonVariants> {
@@ -1,14 +1,20 @@
1
1
  import { ComponentPropsWithoutRef } from 'react';
2
2
  import * as LabelPrimitive from '@radix-ui/react-label';
3
- import { VariantProps } from 'class-variance-authority';
3
+ import { VariantProps } from 'cva';
4
4
  declare const defaultLabelVariants: (props?: ({
5
- level?: "primary" | "secondary" | null | undefined;
6
- position?: "right" | "top" | null | undefined;
7
- size?: "m" | "s" | "l" | null | undefined;
8
- offset?: "high" | "low" | "medium" | null | undefined;
9
- disabled?: boolean | null | undefined;
10
- error?: boolean | null | undefined;
11
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
5
+ level?: "primary" | "secondary" | undefined;
6
+ position?: "right" | "top" | undefined;
7
+ size?: "m" | "s" | "l" | undefined;
8
+ offset?: "high" | "low" | "medium" | undefined;
9
+ disabled?: boolean | undefined;
10
+ error?: boolean | undefined;
11
+ } & ({
12
+ class?: import("cva").ClassValue;
13
+ className?: never;
14
+ } | {
15
+ class?: never;
16
+ className?: import("cva").ClassValue;
17
+ })) | undefined) => string;
12
18
  interface LabelProps extends ComponentPropsWithoutRef<typeof LabelPrimitive.Root>, VariantProps<typeof defaultLabelVariants> {
13
19
  level?: 'primary' | 'secondary';
14
20
  position?: 'top' | 'right';
@@ -1,11 +1,17 @@
1
1
  import { ButtonIconProps, ButtonSizeType, CommonButtonProps } from '../../index';
2
- import { VariantProps } from 'class-variance-authority';
2
+ import { VariantProps } from 'cva';
3
3
  declare const textButtonVariants: (props?: ({
4
- level?: "primary" | "secondary" | "tertiary" | "inverse" | "inverse-static" | null | undefined;
5
- size?: "m" | "s" | null | undefined;
6
- thick?: boolean | null | undefined;
7
- underline?: boolean | null | undefined;
8
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
4
+ level?: "primary" | "secondary" | "tertiary" | "inverse" | "inverse-static" | undefined;
5
+ size?: "m" | "s" | undefined;
6
+ thick?: boolean | undefined;
7
+ underline?: boolean | undefined;
8
+ } & ({
9
+ class?: import("cva").ClassValue;
10
+ className?: never;
11
+ } | {
12
+ class?: never;
13
+ className?: import("cva").ClassValue;
14
+ })) | undefined) => string;
9
15
  type TextLevelType = 'primary' | 'secondary' | 'tertiary' | 'inverse' | 'inverse-static';
10
16
  type TextButtonSizeType = Extract<ButtonSizeType, 'm' | 's'>;
11
17
  export interface TextButtonProps extends CommonButtonProps, VariantProps<typeof textButtonVariants> {
@@ -1,10 +1,16 @@
1
1
  import { InputHTMLAttributes } from 'react';
2
- import { VariantProps } from 'class-variance-authority';
2
+ import { VariantProps } from 'cva';
3
3
  import { DefaultButtonProps, FillType } from '../Button';
4
4
  import { BasicColorType } from '../../types/color';
5
5
  declare const defaultTextfieldVariants: (props?: ({
6
- color?: "neutral-container-lowest" | "neutral-container-mid" | null | undefined;
7
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ color?: "neutral-container-lowest" | "neutral-container-mid" | undefined;
7
+ } & ({
8
+ class?: import("cva").ClassValue;
9
+ className?: never;
10
+ } | {
11
+ class?: never;
12
+ className?: import("cva").ClassValue;
13
+ })) | undefined) => string;
8
14
  export interface TextfieldButtonProps extends Omit<DefaultButtonProps<FillType>, 'size'> {
9
15
  }
10
16
  export type TextfieldLabelType = 'in' | 'out';
@@ -1,3 +1,9 @@
1
1
  export declare const colorVariants: (props?: ({
2
- type?: import("../..").BasicColorType | null | undefined;
3
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
2
+ type?: import("../..").BasicColorType | undefined;
3
+ } & ({
4
+ class?: import("cva").ClassValue;
5
+ className?: never;
6
+ } | {
7
+ class?: never;
8
+ className?: import("cva").ClassValue;
9
+ })) | undefined) => string;
package/lib/index.cjs CHANGED
@@ -7374,11 +7374,11 @@ var style_module_default = {
7374
7374
  };
7375
7375
 
7376
7376
  // src/components/Button/index.tsx
7377
- var import_class_variance_authority3 = require("class-variance-authority");
7377
+ var import_cva3 = require("cva");
7378
7378
  var import_clsx2 = __toESM(require("clsx"));
7379
7379
 
7380
7380
  // src/components/Icon/index.tsx
7381
- var import_class_variance_authority = require("class-variance-authority");
7381
+ var import_cva = require("cva");
7382
7382
  var import_clsx = __toESM(require("clsx"));
7383
7383
 
7384
7384
  // src/components/Icon/style.module.scss
@@ -7464,7 +7464,8 @@ var colorKeys = [
7464
7464
  "accent-purple",
7465
7465
  "accent-pink"
7466
7466
  ];
7467
- var iconVariants = (0, import_class_variance_authority.cva)(style_module_default2.icon, {
7467
+ var iconVariants = (0, import_cva.cva)({
7468
+ base: style_module_default2.icon,
7468
7469
  variants: {
7469
7470
  type: arrayToStyleObject(colorKeys, style_module_default2),
7470
7471
  fillType: arrayToStyleObject(colorKeys, style_module_default2, "fill")
@@ -7515,9 +7516,10 @@ var style_module_default3 = {
7515
7516
  };
7516
7517
 
7517
7518
  // src/components/_ButtonLoading/index.tsx
7518
- var import_class_variance_authority2 = require("class-variance-authority");
7519
+ var import_cva2 = require("cva");
7519
7520
  var import_jsx_runtime156 = require("react/jsx-runtime");
7520
- var loadingVariants = (0, import_class_variance_authority2.cva)([style_module_default3["loading-dot"]], {
7521
+ var loadingVariants = (0, import_cva2.cva)({
7522
+ base: [style_module_default3["loading-dot"]],
7521
7523
  variants: {
7522
7524
  size: {
7523
7525
  m: style_module_default3["m"],
@@ -7604,7 +7606,8 @@ var buttonFillLevelIconFillTypeMap = {
7604
7606
  "inverse-static": void 0
7605
7607
  }
7606
7608
  };
7607
- var defaultButtonVariants = (0, import_class_variance_authority3.cva)([style_module_default.button, style_module_default.default], {
7609
+ var defaultButtonVariants = (0, import_cva3.cva)({
7610
+ base: [style_module_default.button, style_module_default.default],
7608
7611
  variants: {
7609
7612
  level: {
7610
7613
  primary: style_module_default.primary,
@@ -7635,7 +7638,8 @@ var defaultButtonVariants = (0, import_class_variance_authority3.cva)([style_mod
7635
7638
  }
7636
7639
  }
7637
7640
  });
7638
- var defaultButtonChildrenVariants = (0, import_class_variance_authority3.cva)(style_module_default.children, {
7641
+ var defaultButtonChildrenVariants = (0, import_cva3.cva)({
7642
+ base: style_module_default.children,
7639
7643
  variants: {
7640
7644
  size: {
7641
7645
  cta: style_module_default["cta-children"],
@@ -7757,7 +7761,7 @@ var import_clsx3 = __toESM(require("clsx"));
7757
7761
  var import_react2 = require("react");
7758
7762
 
7759
7763
  // src/components/Typography/utils.ts
7760
- var import_class_variance_authority4 = require("class-variance-authority");
7764
+ var import_cva4 = require("cva");
7761
7765
 
7762
7766
  // src/components/Typography/Set/style.module.scss
7763
7767
  var style_module_default5 = {
@@ -7788,7 +7792,8 @@ var style_module_default5 = {
7788
7792
  };
7789
7793
 
7790
7794
  // src/components/Typography/utils.ts
7791
- var colorVariants = (0, import_class_variance_authority4.cva)(style_module_default5.typography, {
7795
+ var colorVariants = (0, import_cva4.cva)({
7796
+ base: style_module_default5.typography,
7792
7797
  variants: {
7793
7798
  type: arrayToStyleObject(colorKeys, style_module_default5)
7794
7799
  }
@@ -8567,11 +8572,11 @@ var style_module_default6 = {
8567
8572
  };
8568
8573
 
8569
8574
  // src/components/Popover/index.tsx
8570
- var import_class_variance_authority6 = require("class-variance-authority");
8575
+ var import_cva6 = require("cva");
8571
8576
  var import_clsx9 = require("clsx");
8572
8577
 
8573
8578
  // src/components/TextButton/index.tsx
8574
- var import_class_variance_authority5 = require("class-variance-authority");
8579
+ var import_cva5 = require("cva");
8575
8580
 
8576
8581
  // src/components/TextButton/style.module.scss
8577
8582
  var style_module_default7 = {
@@ -8607,7 +8612,8 @@ var textButtonLevelIconFillTypeMap = {
8607
8612
  inverse: "neutral-label-primary",
8608
8613
  "inverse-static": "neutral-label-static-primary"
8609
8614
  };
8610
- var textButtonVariants = (0, import_class_variance_authority5.cva)([style_module_default7.button, style_module_default7.text], {
8615
+ var textButtonVariants = (0, import_cva5.cva)({
8616
+ base: [style_module_default7.button, style_module_default7.text],
8611
8617
  variants: {
8612
8618
  level: {
8613
8619
  primary: [style_module_default7["primary"], "lp-sys-typo-caption1-normal-medium"],
@@ -8672,7 +8678,8 @@ var TextButton = (0, import_react10.forwardRef)(
8672
8678
  // src/components/Popover/index.tsx
8673
8679
  var import_jsx_runtime166 = require("react/jsx-runtime");
8674
8680
  var DEFAULT_OFFSET = -6;
8675
- var popoverVariants = (0, import_class_variance_authority6.cva)(style_module_default6.content, {
8681
+ var popoverVariants = (0, import_cva6.cva)({
8682
+ base: style_module_default6.content,
8676
8683
  variants: {
8677
8684
  level: {
8678
8685
  primary: style_module_default6.primary,
@@ -8680,7 +8687,8 @@ var popoverVariants = (0, import_class_variance_authority6.cva)(style_module_def
8680
8687
  }
8681
8688
  }
8682
8689
  });
8683
- var popoverAnchorVariants = (0, import_class_variance_authority6.cva)(style_module_default6.anchor, {
8690
+ var popoverAnchorVariants = (0, import_cva6.cva)({
8691
+ base: style_module_default6.anchor,
8684
8692
  variants: {
8685
8693
  level: {
8686
8694
  primary: style_module_default6.primary,
@@ -8688,10 +8696,10 @@ var popoverAnchorVariants = (0, import_class_variance_authority6.cva)(style_modu
8688
8696
  }
8689
8697
  }
8690
8698
  });
8691
- var popoverTagVariants = (0, import_class_variance_authority6.cva)([style_module_default6.tag, "lp-sys-typo-caption3-normal-bold"]);
8692
- var popoverTitleVariants = (0, import_class_variance_authority6.cva)([style_module_default6.title, "lp-sys-typo-paragraph3-normal-bold"]);
8693
- var popoverDescriptionVariants = (0, import_class_variance_authority6.cva)([style_module_default6.description, "lp-sys-typo-caption1-normal-regular"]);
8694
- var popoverFooterVariants = (0, import_class_variance_authority6.cva)([style_module_default6.footer, "lp-sys-typo-caption1-normal-medium"]);
8699
+ var popoverTagVariants = (0, import_cva6.cva)({ base: [style_module_default6.tag, "lp-sys-typo-caption3-normal-bold"] });
8700
+ var popoverTitleVariants = (0, import_cva6.cva)({ base: [style_module_default6.title, "lp-sys-typo-paragraph3-normal-bold"] });
8701
+ var popoverDescriptionVariants = (0, import_cva6.cva)({ base: [style_module_default6.description, "lp-sys-typo-caption1-normal-regular"] });
8702
+ var popoverFooterVariants = (0, import_cva6.cva)({ base: [style_module_default6.footer, "lp-sys-typo-caption1-normal-medium"] });
8695
8703
  var PopoverRoot = /* @__PURE__ */ __name(({ isOpen, children, onChange }) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(PopoverPrimitive.Root, { open: isOpen, onOpenChange: onChange, children }), "PopoverRoot");
8696
8704
  var PopoverTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(PopoverPrimitive.Trigger, { asChild: true, children: by }), "PopoverTrigger");
8697
8705
  var PopoverAnchor = /* @__PURE__ */ __name(({ className }) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("svg", { className, xmlns: "http://www.w3.org/2000/svg", width: "30", height: "10", viewBox: "0 0 30 10", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
@@ -8787,11 +8795,11 @@ var style_module_default8 = {
8787
8795
  };
8788
8796
 
8789
8797
  // src/components/Tooltip/index.tsx
8790
- var import_class_variance_authority7 = require("class-variance-authority");
8798
+ var import_cva7 = require("cva");
8791
8799
  var import_clsx10 = __toESM(require("clsx"));
8792
8800
  var import_jsx_runtime167 = require("react/jsx-runtime");
8793
8801
  var DEFAULT_OFFSET2 = "medium";
8794
- var tooltipVariants = (0, import_class_variance_authority7.cva)([style_module_default8.tooltip, "lp-sys-typo-caption1-normal-medium"]);
8802
+ var tooltipVariants = (0, import_cva7.cva)({ base: [style_module_default8.tooltip, "lp-sys-typo-caption1-normal-medium"] });
8795
8803
  var TooltipProvider = TooltipPrimitive.Provider;
8796
8804
  var TooltipRoot = /* @__PURE__ */ __name(({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(TooltipPrimitive.Root, { delayDuration: 0, ...props, children }), "TooltipRoot");
8797
8805
  var TooltipTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(TooltipPrimitive.Trigger, { asChild: true, children: by }), "TooltipTrigger");
@@ -8816,7 +8824,7 @@ var Tooltip = Object.assign(TooltipRoot, {
8816
8824
  });
8817
8825
 
8818
8826
  // src/components/IconButton/index.tsx
8819
- var import_class_variance_authority8 = require("class-variance-authority");
8827
+ var import_cva8 = require("cva");
8820
8828
  var import_react12 = require("react");
8821
8829
  var import_clsx11 = __toESM(require("clsx"));
8822
8830
 
@@ -8876,7 +8884,8 @@ var iconButtonLevelIconTypeMap = {
8876
8884
  "inverse-static": "inverse-label-static-primary"
8877
8885
  }
8878
8886
  };
8879
- var iconButtonVariants = (0, import_class_variance_authority8.cva)([style_module_default9.iconButton], {
8887
+ var iconButtonVariants = (0, import_cva8.cva)({
8888
+ base: [style_module_default9.iconButton],
8880
8889
  variants: {
8881
8890
  level: {
8882
8891
  primary: style_module_default9.primary,
@@ -8971,9 +8980,10 @@ var style_module_default11 = {
8971
8980
  };
8972
8981
 
8973
8982
  // src/components/Label/index.tsx
8974
- var import_class_variance_authority9 = require("class-variance-authority");
8983
+ var import_cva9 = require("cva");
8975
8984
  var import_jsx_runtime169 = require("react/jsx-runtime");
8976
- var defaultLabelVariants = (0, import_class_variance_authority9.cva)(["lp-sys-typo-paragraph2-normal-medium", style_module_default11.label], {
8985
+ var defaultLabelVariants = (0, import_cva9.cva)({
8986
+ base: ["lp-sys-typo-paragraph2-normal-medium", style_module_default11.label],
8977
8987
  variants: {
8978
8988
  level: {
8979
8989
  primary: style_module_default11.primary,
@@ -9098,11 +9108,12 @@ var style_module_default13 = {
9098
9108
  };
9099
9109
 
9100
9110
  // src/components/Textfield/index.tsx
9101
- var import_class_variance_authority10 = require("class-variance-authority");
9111
+ var import_cva10 = require("cva");
9102
9112
  var import_clsx15 = __toESM(require("clsx"));
9103
9113
  var import_react_dom = require("react-dom");
9104
9114
  var import_jsx_runtime172 = require("react/jsx-runtime");
9105
- var defaultTextfieldVariants = (0, import_class_variance_authority10.cva)(style_module_default13.textfield, {
9115
+ var defaultTextfieldVariants = (0, import_cva10.cva)({
9116
+ base: style_module_default13.textfield,
9106
9117
  variants: {
9107
9118
  color: {
9108
9119
  "neutral-container-mid": style_module_default13.gray,