@liner-fe/prism 1.8.5 → 1.8.7
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/components/Radio/index.d.ts +4 -1
- package/lib/components/Typography/Caption.d.ts +5 -6
- package/lib/components/Typography/Display.d.ts +3 -3
- package/lib/components/Typography/Heading.d.ts +3 -3
- package/lib/components/Typography/Paragraph.d.ts +5 -6
- package/lib/components/Typography/Title.d.ts +3 -4
- package/lib/components/Typography/types.d.ts +5 -0
- package/lib/components/_Description/index.d.ts +5 -0
- package/lib/index.mjs +18 -85
- package/lib/index.mjs.map +4 -4
- package/package.json +4 -1
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
2
|
+
export declare const Radio: import("react").ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
3
|
+
Item: import("react").ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
interface IPropsNormalBold extends HTMLAttributes<HTMLDivElement> {
|
|
1
|
+
import { BOLD, ITypographyCommon, MEDIUM, NORMAL, REGULAR } from './types';
|
|
2
|
+
interface IPropsNormalBold extends ITypographyCommon<HTMLElement> {
|
|
4
3
|
type: NORMAL;
|
|
5
4
|
size: 1 | 2 | 3;
|
|
6
5
|
weight: BOLD;
|
|
7
6
|
}
|
|
8
|
-
interface IPropsNormalRegular extends
|
|
7
|
+
interface IPropsNormalRegular extends ITypographyCommon<HTMLElement> {
|
|
9
8
|
type: NORMAL;
|
|
10
9
|
size: 1 | 2 | 3;
|
|
11
10
|
weight: REGULAR;
|
|
12
11
|
}
|
|
13
|
-
interface IPropsNormalMedium extends
|
|
12
|
+
interface IPropsNormalMedium extends ITypographyCommon<HTMLElement> {
|
|
14
13
|
type: NORMAL;
|
|
15
14
|
size: 1;
|
|
16
15
|
weight: MEDIUM;
|
|
17
16
|
}
|
|
18
17
|
export type ICaptionProps = IPropsNormalBold | IPropsNormalRegular | IPropsNormalMedium;
|
|
19
|
-
export declare const Caption: ({ children, size, weight, type, className, ...rest }: ICaptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const Caption: ({ children, size, weight, type, className, color, ...rest }: ICaptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface IDisplayProps extends
|
|
1
|
+
import { ITypographyCommon } from './types';
|
|
2
|
+
export interface IDisplayProps extends ITypographyCommon {
|
|
3
3
|
size: 1 | 2 | 3;
|
|
4
4
|
type: 'accent' | 'normal';
|
|
5
5
|
weight: 'black';
|
|
6
6
|
}
|
|
7
|
-
export declare const Display: (
|
|
7
|
+
export declare const Display: ({ size, type, weight, className, children, color, ...rest }: IDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface IHeadingProps extends
|
|
1
|
+
import { ITypographyCommon } from './types';
|
|
2
|
+
export interface IHeadingProps extends ITypographyCommon<HTMLHeadingElement> {
|
|
3
3
|
type: 'answer';
|
|
4
4
|
size: 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
5
|
}
|
|
6
|
-
export declare const Heading: (
|
|
6
|
+
export declare const Heading: ({ size, children, type, className, style, color, ...rest }: IHeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface IPropsNormal extends HTMLAttributes<HTMLDivElement> {
|
|
1
|
+
import { ACCENT, BOLD, ITypographyCommon, MEDIUM, NORMAL, POST, REGULAR } from './types';
|
|
2
|
+
export interface IPropsNormal extends ITypographyCommon {
|
|
4
3
|
type: NORMAL;
|
|
5
4
|
size: 1 | 2 | 3 | 4;
|
|
6
5
|
weight: REGULAR | MEDIUM | BOLD;
|
|
7
6
|
}
|
|
8
|
-
export interface IPropsPost extends
|
|
7
|
+
export interface IPropsPost extends ITypographyCommon {
|
|
9
8
|
type: POST;
|
|
10
9
|
size: 1 | 3;
|
|
11
10
|
weight: REGULAR;
|
|
12
11
|
}
|
|
13
|
-
export interface IPropsAccent extends
|
|
12
|
+
export interface IPropsAccent extends ITypographyCommon {
|
|
14
13
|
type: ACCENT;
|
|
15
14
|
size: 1 | 2 | 3;
|
|
16
15
|
weight: REGULAR | MEDIUM | BOLD;
|
|
17
16
|
}
|
|
18
17
|
export type ParagraphProps = IPropsNormal | IPropsPost | IPropsAccent;
|
|
19
|
-
export declare const Paragraph: (
|
|
18
|
+
export declare const Paragraph: ({ size, type, weight, className, children, color, ...rest }: ParagraphProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface ITitleProps extends HTMLAttributes<HTMLDivElement> {
|
|
1
|
+
import { ACCENT, BOLD, ITypographyCommon, MEDIUM, NORMAL } from './types';
|
|
2
|
+
export interface ITitleProps extends ITypographyCommon {
|
|
4
3
|
type: ACCENT | NORMAL;
|
|
5
4
|
weight: BOLD | MEDIUM;
|
|
6
5
|
size: 1 | 2 | 3 | 4;
|
|
7
6
|
}
|
|
8
|
-
export declare const Title: (
|
|
7
|
+
export declare const Title: ({ weight, size, type, className, children, color, ...rest }: ITitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { SystemKeys } from '@liner-fe/design-token';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
export interface ITypographyCommon<T extends HTMLElement = HTMLParagraphElement> extends HTMLAttributes<T> {
|
|
4
|
+
color?: SystemKeys;
|
|
5
|
+
}
|
|
1
6
|
export type BLACK = 'black';
|
|
2
7
|
export type BOLD = 'bold';
|
|
3
8
|
export type MEDIUM = 'medium';
|
package/lib/index.mjs
CHANGED
|
@@ -4668,15 +4668,8 @@ import { useEffect, useRef, useState } from "react";
|
|
|
4668
4668
|
// src/components/Typography/Paragraph.tsx
|
|
4669
4669
|
import clsx3 from "clsx";
|
|
4670
4670
|
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
4671
|
-
var Paragraph = /* @__PURE__ */ __name((
|
|
4672
|
-
return /* @__PURE__ */ jsx92(
|
|
4673
|
-
"div",
|
|
4674
|
-
{
|
|
4675
|
-
...props,
|
|
4676
|
-
className: clsx3(`lp-sys-typo-paragraph${props.size}-${props.type}-${props.weight}`, props.className),
|
|
4677
|
-
children: props.children
|
|
4678
|
-
}
|
|
4679
|
-
);
|
|
4671
|
+
var Paragraph = /* @__PURE__ */ __name(({ size, type, weight, className, children, color, ...rest }) => {
|
|
4672
|
+
return /* @__PURE__ */ jsx92("p", { ...rest, className: clsx3(`lp-sys-typo-paragraph${size}-${type}-${weight}`, className), style: { color }, children });
|
|
4680
4673
|
}, "Paragraph");
|
|
4681
4674
|
|
|
4682
4675
|
// src/components/Toast/index.tsx
|
|
@@ -4739,29 +4732,30 @@ var SingleToast = /* @__PURE__ */ __name((props) => {
|
|
|
4739
4732
|
// src/components/Typography/Heading.tsx
|
|
4740
4733
|
import clsx4 from "clsx";
|
|
4741
4734
|
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
4742
|
-
var Heading = /* @__PURE__ */ __name((
|
|
4743
|
-
|
|
4735
|
+
var Heading = /* @__PURE__ */ __name(({ size, children, type, className, style, color, ...rest }) => {
|
|
4736
|
+
const Element = `h${size}`;
|
|
4737
|
+
return /* @__PURE__ */ jsx94(Element, { ...rest, className: clsx4(`lp-sys-typo-heading${size}-${type}`, className), style: { color }, children });
|
|
4744
4738
|
}, "Heading");
|
|
4745
4739
|
|
|
4746
4740
|
// src/components/Typography/Display.tsx
|
|
4747
4741
|
import clsx5 from "clsx";
|
|
4748
4742
|
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
4749
|
-
var Display = /* @__PURE__ */ __name((
|
|
4750
|
-
return /* @__PURE__ */ jsx95("
|
|
4743
|
+
var Display = /* @__PURE__ */ __name(({ size, type, weight, className, children, color, ...rest }) => {
|
|
4744
|
+
return /* @__PURE__ */ jsx95("p", { ...rest, className: clsx5(`lp-sys-typo-display${size}-${type}-${weight}`, className), style: { color }, children });
|
|
4751
4745
|
}, "Display");
|
|
4752
4746
|
|
|
4753
4747
|
// src/components/Typography/Title.tsx
|
|
4754
4748
|
import clsx6 from "clsx";
|
|
4755
4749
|
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
4756
|
-
var Title2 = /* @__PURE__ */ __name((
|
|
4757
|
-
return /* @__PURE__ */ jsx96("
|
|
4750
|
+
var Title2 = /* @__PURE__ */ __name(({ weight, size, type, className, children, color, ...rest }) => {
|
|
4751
|
+
return /* @__PURE__ */ jsx96("p", { ...rest, className: clsx6(`lp-sys-typo-title${size}-${type}-${weight}`, className), style: { color }, children });
|
|
4758
4752
|
}, "Title");
|
|
4759
4753
|
|
|
4760
4754
|
// src/components/Typography/Caption.tsx
|
|
4761
4755
|
import clsx7 from "clsx";
|
|
4762
4756
|
import { jsx as jsx97 } from "react/jsx-runtime";
|
|
4763
|
-
var Caption = /* @__PURE__ */ __name(({ children, size, weight, type, className, ...rest }) => {
|
|
4764
|
-
return /* @__PURE__ */ jsx97("
|
|
4757
|
+
var Caption = /* @__PURE__ */ __name(({ children, size, weight, type, className, color, ...rest }) => {
|
|
4758
|
+
return /* @__PURE__ */ jsx97("caption", { ...rest, className: clsx7(`lp-sys-typo-caption${size}-${type}-${weight}`, className), style: { color }, children });
|
|
4765
4759
|
}, "Caption");
|
|
4766
4760
|
|
|
4767
4761
|
// src/components/Popover/index.tsx
|
|
@@ -4990,69 +4984,8 @@ var IconButton = forwardRef4(
|
|
|
4990
4984
|
);
|
|
4991
4985
|
|
|
4992
4986
|
// src/components/Label/index.tsx
|
|
4993
|
-
import { forwardRef as
|
|
4994
|
-
|
|
4995
|
-
// ../../node_modules/@radix-ui/react-label/dist/index.mjs
|
|
4996
|
-
import * as React3 from "react";
|
|
4997
|
-
|
|
4998
|
-
// ../../node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
4999
|
-
import * as React2 from "react";
|
|
5000
|
-
import * as ReactDOM from "react-dom";
|
|
5001
|
-
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
5002
|
-
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
5003
|
-
var NODES = [
|
|
5004
|
-
"a",
|
|
5005
|
-
"button",
|
|
5006
|
-
"div",
|
|
5007
|
-
"form",
|
|
5008
|
-
"h2",
|
|
5009
|
-
"h3",
|
|
5010
|
-
"img",
|
|
5011
|
-
"input",
|
|
5012
|
-
"label",
|
|
5013
|
-
"li",
|
|
5014
|
-
"nav",
|
|
5015
|
-
"ol",
|
|
5016
|
-
"p",
|
|
5017
|
-
"span",
|
|
5018
|
-
"svg",
|
|
5019
|
-
"ul"
|
|
5020
|
-
];
|
|
5021
|
-
var Primitive = NODES.reduce((primitive, node) => {
|
|
5022
|
-
const Node = React2.forwardRef((props, forwardedRef) => {
|
|
5023
|
-
const { asChild, ...primitiveProps } = props;
|
|
5024
|
-
const Comp = asChild ? Slot3 : node;
|
|
5025
|
-
if (typeof window !== "undefined") {
|
|
5026
|
-
window[Symbol.for("radix-ui")] = true;
|
|
5027
|
-
}
|
|
5028
|
-
return /* @__PURE__ */ jsx101(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
5029
|
-
});
|
|
5030
|
-
Node.displayName = `Primitive.${node}`;
|
|
5031
|
-
return { ...primitive, [node]: Node };
|
|
5032
|
-
}, {});
|
|
5033
|
-
|
|
5034
|
-
// ../../node_modules/@radix-ui/react-label/dist/index.mjs
|
|
5035
|
-
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
5036
|
-
var NAME = "Label";
|
|
5037
|
-
var Label = React3.forwardRef((props, forwardedRef) => {
|
|
5038
|
-
return /* @__PURE__ */ jsx102(
|
|
5039
|
-
Primitive.label,
|
|
5040
|
-
{
|
|
5041
|
-
...props,
|
|
5042
|
-
ref: forwardedRef,
|
|
5043
|
-
onMouseDown: /* @__PURE__ */ __name((event) => {
|
|
5044
|
-
const target = event.target;
|
|
5045
|
-
if (target.closest("button, input, select, textarea")) return;
|
|
5046
|
-
props.onMouseDown?.(event);
|
|
5047
|
-
if (!event.defaultPrevented && event.detail > 1) event.preventDefault();
|
|
5048
|
-
}, "onMouseDown")
|
|
5049
|
-
}
|
|
5050
|
-
);
|
|
5051
|
-
});
|
|
5052
|
-
Label.displayName = NAME;
|
|
5053
|
-
var Root4 = Label;
|
|
5054
|
-
|
|
5055
|
-
// src/components/Label/index.tsx
|
|
4987
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
4988
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
5056
4989
|
import clsx11 from "clsx";
|
|
5057
4990
|
|
|
5058
4991
|
// src/components/Label/style.module.scss
|
|
@@ -5061,10 +4994,10 @@ var style_module_default7 = {
|
|
|
5061
4994
|
};
|
|
5062
4995
|
|
|
5063
4996
|
// src/components/Label/index.tsx
|
|
5064
|
-
import { jsx as
|
|
5065
|
-
var
|
|
5066
|
-
return /* @__PURE__ */
|
|
5067
|
-
|
|
4997
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
4998
|
+
var Label = forwardRef5(({ className, ...props }, ref) => {
|
|
4999
|
+
return /* @__PURE__ */ jsx101(
|
|
5000
|
+
LabelPrimitive.Root,
|
|
5068
5001
|
{
|
|
5069
5002
|
ref,
|
|
5070
5003
|
className: clsx11("lp-sys-typo-paragraph2-normal-medium", style_module_default7.label, className),
|
|
@@ -5080,7 +5013,7 @@ export {
|
|
|
5080
5013
|
Heading,
|
|
5081
5014
|
Icon,
|
|
5082
5015
|
IconButton,
|
|
5083
|
-
|
|
5016
|
+
Label,
|
|
5084
5017
|
Paragraph,
|
|
5085
5018
|
Popover,
|
|
5086
5019
|
TextButton,
|