@cocso-ui/react 0.0.1-beta.3 → 0.0.1-beta.4
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/Body/Body.d.ts +4 -6
- package/lib/index.cjs +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -6,10 +6,8 @@ export type BodyProps<T extends BodyElement = 'p'> = {
|
|
|
6
6
|
color?: string;
|
|
7
7
|
fontWeight?: 'normal' | 'bold';
|
|
8
8
|
} & Omit<React.ComponentPropsWithoutRef<T>, 'size' | 'color' | 'fontWeight'>;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
fontWeight?: "normal" | "bold";
|
|
14
|
-
} & Omit<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> | Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> | Omit<React.DetailedHTMLProps<React.BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, "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.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> | Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> | Omit<React.DetailedHTMLProps<React.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref"> | Omit<React.DetailedHTMLProps<React.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "ref">, "size" | "color" | "fontWeight"> & React.RefAttributes<HTMLElement>>;
|
|
9
|
+
type BodyComponent = <T extends BodyElement = 'p'>(props: BodyProps<T> & React.RefAttributes<React.ComponentRef<T>>) => React.ReactElement;
|
|
10
|
+
export declare const Body: BodyComponent & {
|
|
11
|
+
displayName?: string;
|
|
12
|
+
};
|
|
15
13
|
export {};
|
package/lib/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var B=Object.create;var m=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var W=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var H=(t,o)=>{for(var r in o)m(t,r,{get:o[r],enumerable:!0})},c=(t,o,r,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of W(o))!D.call(t,n)&&n!==r&&m(t,n,{get:()=>o[n],enumerable:!(a=N(o,n))||a.enumerable});return t};var d=(t,o,r)=>(r=t!=null?B($(t)):{},c(o||!t||!t.__esModule?m(r,"default",{value:t,enumerable:!0}):r,t)),w=t=>c(m({},"__esModule",{value:!0}),t);var q={};H(q,{Body:()=>x,Display:()=>g,Heading:()=>T,Primitive:()=>S,createPrimitive:()=>e});module.exports=w(q);var f=require("@radix-ui/react-slot"),h=d(require("react"),1),R=require("react/jsx-runtime");function e(t){let o=h.forwardRef((r,a)=>{let{asChild:n,...s}=r;return(0,R.jsx)(n?f.Slot:t,{...s,ref:a})});return o.displayName=`Primitive.${t}`,o}var S={div:e("div"),span:e("span"),button:e("button"),input:e("input"),form:e("form"),label:e("label"),p:e("p"),h1:e("h1"),h2:e("h2"),h3:e("h3"),h4:e("h4"),h5:e("h5"),h6:e("h6"),section:e("section"),article:e("article"),header:e("header"),footer:e("footer"),main:e("main"),nav:e("nav"),aside:e("aside"),ul:e("ul"),ol:e("ol"),li:e("li"),img:e("img"),a:e("a"),strong:e("strong"),em:e("em"),small:e("small"),table:e("table"),thead:e("thead"),tbody:e("tbody"),tr:e("tr"),td:e("td"),th:e("th")};var y=d(require("react"),1),C=require("react/jsx-runtime");function z(t){if(t)return`var(--color-${t.replace(".","-")})`}var F=({as:t="p",size:o="md",color:r="",fontWeight:a="normal",style:n,className:s,...i},p)=>{let l=t,v=`text-body text-body-${o}${a==="bold"?"-bold":""} ${s}`;return(0,C.jsx)(l,{ref:p,className:v,style:{"--text-color":z(r),...n},...i})},x=y.forwardRef(F);x.displayName="Body";var u=d(require("react"),1),E=require("react/jsx-runtime");function O(t){if(t)return`var(--color-${t.replace(".","-")})`}var g=u.forwardRef(({as:t="h1",size:o="md",color:r="",style:a,className:n,...s},i)=>{let p=t,l=`text-display text-display-${o} ${n}`;return(0,E.jsx)(p,{ref:i,className:l,style:{"--text-color":O(r),...a},...s})});g.displayName="Display";var P=d(require("react"),1),b=require("react/jsx-runtime");function k(t){if(t)return`var(--color-${t.replace(".","-")})`}var T=P.forwardRef(({as:t="h2",size:o="md",color:r="",style:a,className:n,...s},i)=>{let p=t,l=`text-heading text-heading-${o} ${n}`;return(0,b.jsx)(p,{ref:i,className:l,style:{"--text-color":k(r),...a},...s})});T.displayName="Heading";
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Slot as R}from"@radix-ui/react-slot";import*as m from"react";import{jsx as y}from"react/jsx-runtime";function e(t){let o=m.forwardRef((r,n)=>{let{asChild:a,...
|
|
1
|
+
import{Slot as R}from"@radix-ui/react-slot";import*as m from"react";import{jsx as y}from"react/jsx-runtime";function e(t){let o=m.forwardRef((r,n)=>{let{asChild:a,...s}=r;return y(a?R:t,{...s,ref:n})});return o.displayName=`Primitive.${t}`,o}var W={div:e("div"),span:e("span"),button:e("button"),input:e("input"),form:e("form"),label:e("label"),p:e("p"),h1:e("h1"),h2:e("h2"),h3:e("h3"),h4:e("h4"),h5:e("h5"),h6:e("h6"),section:e("section"),article:e("article"),header:e("header"),footer:e("footer"),main:e("main"),nav:e("nav"),aside:e("aside"),ul:e("ul"),ol:e("ol"),li:e("li"),img:e("img"),a:e("a"),strong:e("strong"),em:e("em"),small:e("small"),table:e("table"),thead:e("thead"),tbody:e("tbody"),tr:e("tr"),td:e("td"),th:e("th")};import*as d from"react";import{jsx as g}from"react/jsx-runtime";function x(t){if(t)return`var(--color-${t.replace(".","-")})`}var C=({as:t="p",size:o="md",color:r="",fontWeight:n="normal",style:a,className:s,...i},p)=>{let l=t,h=`text-body text-body-${o}${n==="bold"?"-bold":""} ${s}`;return g(l,{ref:p,className:h,style:{"--text-color":x(r),...a},...i})},u=d.forwardRef(C);u.displayName="Body";import*as c from"react";import{jsx as T}from"react/jsx-runtime";function E(t){if(t)return`var(--color-${t.replace(".","-")})`}var P=c.forwardRef(({as:t="h1",size:o="md",color:r="",style:n,className:a,...s},i)=>{let p=t,l=`text-display text-display-${o} ${a}`;return T(p,{ref:i,className:l,style:{"--text-color":E(r),...n},...s})});P.displayName="Display";import*as f from"react";import{jsx as B}from"react/jsx-runtime";function b(t){if(t)return`var(--color-${t.replace(".","-")})`}var v=f.forwardRef(({as:t="h2",size:o="md",color:r="",style:n,className:a,...s},i)=>{let p=t,l=`text-heading text-heading-${o} ${a}`;return B(p,{ref:i,className:l,style:{"--text-color":b(r),...n},...s})});v.displayName="Heading";export{u as Body,P as Display,v as Heading,W as Primitive,e as createPrimitive};
|