@liner-fe/prism 2.1.26 → 2.1.27

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,19 +1,13 @@
1
1
  import { ButtonHTMLAttributes } from 'react';
2
- import { VariantProps } from 'cva';
2
+ import { VariantProps } from 'class-variance-authority';
3
3
  import { IconProps } from '../Icon';
4
4
  declare const defaultButtonVariants: (props?: ({
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;
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;
17
11
  export interface CommonButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
18
12
  as?: 'default' | 'text';
19
13
  asChild?: boolean;
@@ -1,4 +1,4 @@
1
- import { VariantProps } from 'cva';
1
+ import { VariantProps } from 'class-variance-authority';
2
2
  import { IconKey, IconMapType } from '../../type';
3
3
  import { SystemKeys } from '@liner-fe/design-token';
4
4
  import { BasicColorType } from '../../types/color';
@@ -12,15 +12,9 @@ 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 | 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;
15
+ type?: BasicColorType | null | undefined;
16
+ fillType?: BasicColorType | null | undefined;
17
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
24
18
  export declare const getIconComponent: (iconKey: IconKey, map: IconMapType) => import("../../type").IconComponent;
25
19
  export type IconSizeKey = keyof typeof iconSizeMap;
26
20
  export type IconColorType = Extract<SystemKeys, BasicColorType>;
@@ -1,17 +1,11 @@
1
- import { VariantProps } from 'cva';
1
+ import { VariantProps } from 'class-variance-authority';
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" | 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;
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;
15
9
  export type IconButtonLevelType = 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'negative' | 'static' | 'inverse' | 'inverse-static';
16
10
  export type IconSizeType = 'l' | 'm' | 's' | 'xs';
17
11
  export interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof iconButtonVariants> {
@@ -1,20 +1,14 @@
1
1
  import { ComponentPropsWithoutRef } from 'react';
2
2
  import * as LabelPrimitive from '@radix-ui/react-label';
3
- import { VariantProps } from 'cva';
3
+ import { VariantProps } from 'class-variance-authority';
4
4
  declare const defaultLabelVariants: (props?: ({
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;
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;
18
12
  interface LabelProps extends ComponentPropsWithoutRef<typeof LabelPrimitive.Root>, VariantProps<typeof defaultLabelVariants> {
19
13
  level?: 'primary' | 'secondary';
20
14
  position?: 'top' | 'right';
@@ -1,17 +1,11 @@
1
1
  import { ButtonIconProps, ButtonSizeType, CommonButtonProps } from '../../index';
2
- import { VariantProps } from 'cva';
2
+ import { VariantProps } from 'class-variance-authority';
3
3
  declare const textButtonVariants: (props?: ({
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;
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;
15
9
  type TextLevelType = 'primary' | 'secondary' | 'tertiary' | 'inverse' | 'inverse-static';
16
10
  type TextButtonSizeType = Extract<ButtonSizeType, 'm' | 's'>;
17
11
  export interface TextButtonProps extends CommonButtonProps, VariantProps<typeof textButtonVariants> {
@@ -1,16 +1,10 @@
1
1
  import { InputHTMLAttributes } from 'react';
2
- import { VariantProps } from 'cva';
2
+ import { VariantProps } from 'class-variance-authority';
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" | undefined;
7
- } & ({
8
- class?: import("cva").ClassValue;
9
- className?: never;
10
- } | {
11
- class?: never;
12
- className?: import("cva").ClassValue;
13
- })) | undefined) => string;
6
+ color?: "neutral-container-lowest" | "neutral-container-mid" | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
14
8
  export interface TextfieldButtonProps extends Omit<DefaultButtonProps<FillType>, 'size'> {
15
9
  }
16
10
  export type TextfieldLabelType = 'in' | 'out';
@@ -1,9 +1,3 @@
1
1
  export declare const colorVariants: (props?: ({
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;
2
+ type?: import("../..").BasicColorType | null | undefined;
3
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
package/lib/index.cjs CHANGED
@@ -7729,11 +7729,11 @@ var style_module_default = {
7729
7729
  };
7730
7730
 
7731
7731
  // src/components/Button/index.tsx
7732
- var import_cva3 = require("cva");
7732
+ var import_class_variance_authority3 = require("class-variance-authority");
7733
7733
  var import_clsx2 = __toESM(require("clsx"));
7734
7734
 
7735
7735
  // src/components/Icon/index.tsx
7736
- var import_cva = require("cva");
7736
+ var import_class_variance_authority = require("class-variance-authority");
7737
7737
  var import_clsx = __toESM(require("clsx"));
7738
7738
 
7739
7739
  // src/components/Icon/style.module.scss
@@ -7819,8 +7819,7 @@ var colorKeys = [
7819
7819
  "accent-purple",
7820
7820
  "accent-pink"
7821
7821
  ];
7822
- var iconVariants = (0, import_cva.cva)({
7823
- base: style_module_default2.icon,
7822
+ var iconVariants = (0, import_class_variance_authority.cva)(style_module_default2.icon, {
7824
7823
  variants: {
7825
7824
  type: arrayToStyleObject(colorKeys, style_module_default2),
7826
7825
  fillType: arrayToStyleObject(colorKeys, style_module_default2, "fill")
@@ -7871,10 +7870,9 @@ var style_module_default3 = {
7871
7870
  };
7872
7871
 
7873
7872
  // src/components/_ButtonLoading/index.tsx
7874
- var import_cva2 = require("cva");
7873
+ var import_class_variance_authority2 = require("class-variance-authority");
7875
7874
  var import_jsx_runtime163 = require("react/jsx-runtime");
7876
- var loadingVariants = (0, import_cva2.cva)({
7877
- base: [style_module_default3["loading-dot"]],
7875
+ var loadingVariants = (0, import_class_variance_authority2.cva)([style_module_default3["loading-dot"]], {
7878
7876
  variants: {
7879
7877
  size: {
7880
7878
  m: style_module_default3["m"],
@@ -7961,8 +7959,7 @@ var buttonFillLevelIconFillTypeMap = {
7961
7959
  "inverse-static": void 0
7962
7960
  }
7963
7961
  };
7964
- var defaultButtonVariants = (0, import_cva3.cva)({
7965
- base: [style_module_default.button, style_module_default.default],
7962
+ var defaultButtonVariants = (0, import_class_variance_authority3.cva)([style_module_default.button, style_module_default.default], {
7966
7963
  variants: {
7967
7964
  level: {
7968
7965
  primary: style_module_default.primary,
@@ -7993,8 +7990,7 @@ var defaultButtonVariants = (0, import_cva3.cva)({
7993
7990
  }
7994
7991
  }
7995
7992
  });
7996
- var defaultButtonChildrenVariants = (0, import_cva3.cva)({
7997
- base: style_module_default.children,
7993
+ var defaultButtonChildrenVariants = (0, import_class_variance_authority3.cva)(style_module_default.children, {
7998
7994
  variants: {
7999
7995
  size: {
8000
7996
  cta: style_module_default["cta-children"],
@@ -8116,7 +8112,7 @@ var import_clsx3 = __toESM(require("clsx"));
8116
8112
  var import_react2 = require("react");
8117
8113
 
8118
8114
  // src/components/Typography/utils.ts
8119
- var import_cva4 = require("cva");
8115
+ var import_class_variance_authority4 = require("class-variance-authority");
8120
8116
 
8121
8117
  // src/components/Typography/Set/style.module.scss
8122
8118
  var style_module_default5 = {
@@ -8147,8 +8143,7 @@ var style_module_default5 = {
8147
8143
  };
8148
8144
 
8149
8145
  // src/components/Typography/utils.ts
8150
- var colorVariants = (0, import_cva4.cva)({
8151
- base: style_module_default5.typography,
8146
+ var colorVariants = (0, import_class_variance_authority4.cva)(style_module_default5.typography, {
8152
8147
  variants: {
8153
8148
  type: arrayToStyleObject(colorKeys, style_module_default5)
8154
8149
  }
@@ -8927,11 +8922,11 @@ var style_module_default6 = {
8927
8922
  };
8928
8923
 
8929
8924
  // src/components/Popover/index.tsx
8930
- var import_cva6 = require("cva");
8925
+ var import_class_variance_authority6 = require("class-variance-authority");
8931
8926
  var import_clsx9 = require("clsx");
8932
8927
 
8933
8928
  // src/components/TextButton/index.tsx
8934
- var import_cva5 = require("cva");
8929
+ var import_class_variance_authority5 = require("class-variance-authority");
8935
8930
 
8936
8931
  // src/components/TextButton/style.module.scss
8937
8932
  var style_module_default7 = {
@@ -8967,8 +8962,7 @@ var textButtonLevelIconFillTypeMap = {
8967
8962
  inverse: "neutral-label-primary",
8968
8963
  "inverse-static": "neutral-label-static-primary"
8969
8964
  };
8970
- var textButtonVariants = (0, import_cva5.cva)({
8971
- base: [style_module_default7.button, style_module_default7.text],
8965
+ var textButtonVariants = (0, import_class_variance_authority5.cva)([style_module_default7.button, style_module_default7.text], {
8972
8966
  variants: {
8973
8967
  level: {
8974
8968
  primary: [style_module_default7["primary"], "lp-sys-typo-caption1-normal-medium"],
@@ -9033,8 +9027,7 @@ var TextButton = (0, import_react10.forwardRef)(
9033
9027
  // src/components/Popover/index.tsx
9034
9028
  var import_jsx_runtime173 = require("react/jsx-runtime");
9035
9029
  var DEFAULT_OFFSET = -6;
9036
- var popoverVariants = (0, import_cva6.cva)({
9037
- base: style_module_default6.content,
9030
+ var popoverVariants = (0, import_class_variance_authority6.cva)(style_module_default6.content, {
9038
9031
  variants: {
9039
9032
  level: {
9040
9033
  primary: style_module_default6.primary,
@@ -9042,8 +9035,7 @@ var popoverVariants = (0, import_cva6.cva)({
9042
9035
  }
9043
9036
  }
9044
9037
  });
9045
- var popoverAnchorVariants = (0, import_cva6.cva)({
9046
- base: style_module_default6.anchor,
9038
+ var popoverAnchorVariants = (0, import_class_variance_authority6.cva)(style_module_default6.anchor, {
9047
9039
  variants: {
9048
9040
  level: {
9049
9041
  primary: style_module_default6.primary,
@@ -9051,10 +9043,10 @@ var popoverAnchorVariants = (0, import_cva6.cva)({
9051
9043
  }
9052
9044
  }
9053
9045
  });
9054
- var popoverTagVariants = (0, import_cva6.cva)({ base: [style_module_default6.tag, "lp-sys-typo-caption3-normal-bold"] });
9055
- var popoverTitleVariants = (0, import_cva6.cva)({ base: [style_module_default6.title, "lp-sys-typo-paragraph3-normal-bold"] });
9056
- var popoverDescriptionVariants = (0, import_cva6.cva)({ base: [style_module_default6.description, "lp-sys-typo-caption1-normal-regular"] });
9057
- var popoverFooterVariants = (0, import_cva6.cva)({ base: [style_module_default6.footer, "lp-sys-typo-caption1-normal-medium"] });
9046
+ var popoverTagVariants = (0, import_class_variance_authority6.cva)([style_module_default6.tag, "lp-sys-typo-caption3-normal-bold"]);
9047
+ var popoverTitleVariants = (0, import_class_variance_authority6.cva)([style_module_default6.title, "lp-sys-typo-paragraph3-normal-bold"]);
9048
+ var popoverDescriptionVariants = (0, import_class_variance_authority6.cva)([style_module_default6.description, "lp-sys-typo-caption1-normal-regular"]);
9049
+ var popoverFooterVariants = (0, import_class_variance_authority6.cva)([style_module_default6.footer, "lp-sys-typo-caption1-normal-medium"]);
9058
9050
  var PopoverRoot = /* @__PURE__ */ __name(({ isOpen, children, onChange }) => /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(PopoverPrimitive.Root, { open: isOpen, onOpenChange: onChange, children }), "PopoverRoot");
9059
9051
  var PopoverTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(PopoverPrimitive.Trigger, { asChild: true, children: by }), "PopoverTrigger");
9060
9052
  var PopoverAnchor = /* @__PURE__ */ __name(({ className }) => /* @__PURE__ */ (0, import_jsx_runtime173.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_runtime173.jsx)(
@@ -9150,11 +9142,11 @@ var style_module_default8 = {
9150
9142
  };
9151
9143
 
9152
9144
  // src/components/Tooltip/index.tsx
9153
- var import_cva7 = require("cva");
9145
+ var import_class_variance_authority7 = require("class-variance-authority");
9154
9146
  var import_clsx10 = __toESM(require("clsx"));
9155
9147
  var import_jsx_runtime174 = require("react/jsx-runtime");
9156
9148
  var DEFAULT_OFFSET2 = "medium";
9157
- var tooltipVariants = (0, import_cva7.cva)({ base: [style_module_default8.tooltip, "lp-sys-typo-caption1-normal-medium"] });
9149
+ var tooltipVariants = (0, import_class_variance_authority7.cva)([style_module_default8.tooltip, "lp-sys-typo-caption1-normal-medium"]);
9158
9150
  var TooltipProvider = TooltipPrimitive.Provider;
9159
9151
  var TooltipRoot = /* @__PURE__ */ __name(({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(TooltipPrimitive.Root, { delayDuration: 0, ...props, children }), "TooltipRoot");
9160
9152
  var TooltipTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(TooltipPrimitive.Trigger, { asChild: true, children: by }), "TooltipTrigger");
@@ -9179,7 +9171,7 @@ var Tooltip = Object.assign(TooltipRoot, {
9179
9171
  });
9180
9172
 
9181
9173
  // src/components/IconButton/index.tsx
9182
- var import_cva8 = require("cva");
9174
+ var import_class_variance_authority8 = require("class-variance-authority");
9183
9175
  var import_react12 = require("react");
9184
9176
  var import_clsx11 = __toESM(require("clsx"));
9185
9177
 
@@ -9239,8 +9231,7 @@ var iconButtonLevelIconTypeMap = {
9239
9231
  "inverse-static": "inverse-label-static-primary"
9240
9232
  }
9241
9233
  };
9242
- var iconButtonVariants = (0, import_cva8.cva)({
9243
- base: [style_module_default9.iconButton],
9234
+ var iconButtonVariants = (0, import_class_variance_authority8.cva)([style_module_default9.iconButton], {
9244
9235
  variants: {
9245
9236
  level: {
9246
9237
  primary: style_module_default9.primary,
@@ -9335,10 +9326,9 @@ var style_module_default11 = {
9335
9326
  };
9336
9327
 
9337
9328
  // src/components/Label/index.tsx
9338
- var import_cva9 = require("cva");
9329
+ var import_class_variance_authority9 = require("class-variance-authority");
9339
9330
  var import_jsx_runtime176 = require("react/jsx-runtime");
9340
- var defaultLabelVariants = (0, import_cva9.cva)({
9341
- base: ["lp-sys-typo-paragraph2-normal-medium", style_module_default11.label],
9331
+ var defaultLabelVariants = (0, import_class_variance_authority9.cva)(["lp-sys-typo-paragraph2-normal-medium", style_module_default11.label], {
9342
9332
  variants: {
9343
9333
  level: {
9344
9334
  primary: style_module_default11.primary,
@@ -9463,12 +9453,11 @@ var style_module_default13 = {
9463
9453
  };
9464
9454
 
9465
9455
  // src/components/Textfield/index.tsx
9466
- var import_cva10 = require("cva");
9456
+ var import_class_variance_authority10 = require("class-variance-authority");
9467
9457
  var import_clsx15 = __toESM(require("clsx"));
9468
9458
  var import_react_dom = require("react-dom");
9469
9459
  var import_jsx_runtime179 = require("react/jsx-runtime");
9470
- var defaultTextfieldVariants = (0, import_cva10.cva)({
9471
- base: style_module_default13.textfield,
9460
+ var defaultTextfieldVariants = (0, import_class_variance_authority10.cva)(style_module_default13.textfield, {
9472
9461
  variants: {
9473
9462
  color: {
9474
9463
  "neutral-container-mid": style_module_default13.gray,