@cocso-ui/react 0.0.1-beta.5 → 0.0.1-beta.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.
|
@@ -4,12 +4,11 @@ export type BodyProps<T extends BodyElement = 'p'> = {
|
|
|
4
4
|
as?: T;
|
|
5
5
|
size?: 'lg' | 'md' | 'sm' | 'xs';
|
|
6
6
|
color?: string;
|
|
7
|
-
fontWeight?: 'normal' | 'bold';
|
|
7
|
+
fontWeight?: 'normal' | 'medium' | 'semi-bold' | 'bold';
|
|
8
8
|
} & Omit<React.ComponentPropsWithoutRef<T>, 'size' | 'color' | 'fontWeight'>;
|
|
9
|
-
export declare const Body:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> | Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> | Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> | Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> | Omit<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> | Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> | Omit<React.DetailedHTMLProps<React.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref"> | Omit<React.DetailedHTMLProps<React.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "ref"> | Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> | Omit<React.DetailedHTMLProps<React.BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, "ref">, "size" | "color" | "fontWeight"> & React.RefAttributes<HTMLElement>>;
|
|
9
|
+
export declare const Body: (<T extends BodyElement = "p">(props: BodyProps<T> & {
|
|
10
|
+
ref?: React.ForwardedRef<React.ComponentRef<T>>;
|
|
11
|
+
}) => React.ReactElement) & {
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
15
14
|
export {};
|
|
@@ -5,9 +5,9 @@ export type DisplayProps<T extends DisplayElement = 'h1'> = {
|
|
|
5
5
|
size?: 'lg' | 'md' | 'sm';
|
|
6
6
|
color?: string;
|
|
7
7
|
} & Omit<React.ComponentPropsWithoutRef<T>, 'size' | 'color'>;
|
|
8
|
-
export declare const Display:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
8
|
+
export declare const Display: (<T extends DisplayElement = "h1">(props: DisplayProps<T> & {
|
|
9
|
+
ref?: React.ForwardedRef<React.ComponentRef<T>>;
|
|
10
|
+
}) => React.ReactElement) & {
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
13
|
export {};
|
|
@@ -5,9 +5,9 @@ export type HeadingProps<T extends HeadingElement = 'h2'> = {
|
|
|
5
5
|
size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs' | '2xs';
|
|
6
6
|
color?: string;
|
|
7
7
|
} & Omit<React.ComponentPropsWithoutRef<T>, 'size' | 'color'>;
|
|
8
|
-
export declare const Heading:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
8
|
+
export declare const Heading: (<T extends HeadingElement = "h2">(props: HeadingProps<T> & {
|
|
9
|
+
ref?: React.ForwardedRef<React.ComponentRef<T>>;
|
|
10
|
+
}) => React.ReactElement) & {
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
13
|
export {};
|
package/lib/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var E=Object.create;var c=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var w=(e,t)=>{for(var o in t)c(e,o,{get:t[o],enumerable:!0})},f=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of u(t))!B.call(e,n)&&n!==o&&c(e,n,{get:()=>t[n],enumerable:!(r=P(t,n))||r.enumerable});return e};var d=(e,t,o)=>(o=e!=null?E(b(e)):{},f(t||!e||!e.__esModule?c(o,"default",{value:e,enumerable:!0}):o,e)),D=e=>f(c({},"__esModule",{value:!0}),e);var W={};w(W,{Body:()=>N,Display:()=>F,Heading:()=>S});module.exports=D(W);var R=d(require("react"),1);function a(e){if(e)return`var(--color-${e.replace(/\./g,"-")})`}var s=(...e)=>e.filter(Boolean).join(" ").trim();var y=require("react/jsx-runtime"),H=R.forwardRef(({as:e="p",size:t="md",color:o,fontWeight:r="normal",className:n,style:p,...m},i)=>{let l=e,C=s("text-body",`text-body-${t}`,n);return(0,y.jsx)(l,{ref:i,className:C,style:{"--font-color":a(o),"--font-weight":r,...p},...m})}),N=Object.assign(H,{displayName:"Body"});var T=d(require("react"),1);var g=require("react/jsx-runtime"),z=T.forwardRef(({as:e="h1",size:t="md",color:o,className:r,style:n,...p},m)=>{let i=e,l=s("text-display",`text-display-${t}`,r);return(0,g.jsx)(i,{ref:m,className:l,style:{"--font-color":a(o),...n},...p})}),F=Object.assign(z,{displayName:"Display"});var x=d(require("react"),1);var h=require("react/jsx-runtime"),O=x.forwardRef(({as:e="h2",size:t="md",color:o,className:r,style:n,...p},m)=>{let i=e,l=s("text-heading",`text-heading-${t}`,r);return(0,h.jsx)(i,{ref:m,className:l,style:{"--font-color":a(o),...n},...p})}),S=Object.assign(O,{displayName:"Heading"});
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as c from"react";function t(e){if(e)return`var(--color-${e.replace(/\./g,"-")})`}var o=(...e)=>e.filter(Boolean).join(" ").trim();import{jsx as
|
|
1
|
+
import*as c from"react";function t(e){if(e)return`var(--color-${e.replace(/\./g,"-")})`}var o=(...e)=>e.filter(Boolean).join(" ").trim();import{jsx as T}from"react/jsx-runtime";var y=c.forwardRef(({as:e="p",size:n="md",color:r,fontWeight:a="normal",className:s,style:p,...m},i)=>{let l=e,R=o("text-body",`text-body-${n}`,s);return T(l,{ref:i,className:R,style:{"--font-color":t(r),"--font-weight":a,...p},...m})}),B=Object.assign(y,{displayName:"Body"});import*as d from"react";import{jsx as x}from"react/jsx-runtime";var g=d.forwardRef(({as:e="h1",size:n="md",color:r,className:a,style:s,...p},m)=>{let i=e,l=o("text-display",`text-display-${n}`,a);return x(i,{ref:m,className:l,style:{"--font-color":t(r),...s},...p})}),O=Object.assign(g,{displayName:"Display"});import*as f from"react";import{jsx as C}from"react/jsx-runtime";var h=f.forwardRef(({as:e="h2",size:n="md",color:r,className:a,style:s,...p},m)=>{let i=e,l=o("text-heading",`text-heading-${n}`,a);return C(i,{ref:m,className:l,style:{"--font-color":t(r),...s},...p})}),k=Object.assign(h,{displayName:"Heading"});export{B as Body,O as Display,k as Heading};
|