@liner-fe/prism 1.8.6 → 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/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/index.mjs +11 -17
- package/lib/index.mjs.map +2 -2
- package/package.json +1 -1
|
@@ -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
|