@cocso-ui/react 0.0.0-beta.1 → 0.0.0
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/heading.d.ts +8 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -4
- package/lib/index.js +1 -1
- package/lib/primitives.d.ts +0 -0
- package/package.json +1 -1
- package/lib/components/Body/Body.d.ts +0 -11
- package/lib/components/Body/index.d.ts +0 -1
- package/lib/components/Display/Display.d.ts +0 -11
- package/lib/components/Display/index.d.ts +0 -1
- package/lib/components/Heading/Heading.d.ts +0 -11
- package/lib/components/Heading/index.d.ts +0 -1
- package/lib/primitive/index.d.ts +0 -44
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type HeadingProps<E extends React.ElementType> = {
|
|
3
|
+
size?: 'lg' | 'md' | 'sm';
|
|
4
|
+
color?: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
} & React.ComponentPropsWithoutRef<E>;
|
|
8
|
+
export declare const Heading: <E extends React.ElementType = "h2">({ size, color, children, className, ...props }: HeadingProps<E>) => import("react/jsx-runtime").JSX.Element;
|
package/lib/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var n=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var r=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var o in e)n(t,o,{get:e[o],enumerable:!0})},c=(t,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of d(e))!r.call(t,s)&&s!==o&&n(t,s,{get:()=>e[s],enumerable:!(a=m(e,s))||a.enumerable});return t};var h=t=>c(n({},"__esModule",{value:!0}),t);var p={};g(p,{Heading:()=>x});module.exports=h(p);var l=require("react/jsx-runtime"),x=({size:t="md",color:e="gray-90",children:o,className:a="",...s})=>{let i={lg:"text-heading-l-mobile sm:text-heading-l",md:"text-heading-m-mobile sm:text-heading-m",sm:"text-heading-s-mobile sm:text-heading-s"}[t];return(0,l.jsx)("h2",{className:`${i} font-bold ${a}`,...s,children:o})};
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";var d=({size:e="md",color:l="gray-90",children:t,className:s="",...o})=>{let a={lg:"text-heading-l-mobile sm:text-heading-l",md:"text-heading-m-mobile sm:text-heading-m",sm:"text-heading-s-mobile sm:text-heading-s"}[e];return n("h2",{className:`${a} font-bold ${s}`,...o,children:t})};export{d as Heading};
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
type BodyElement = 'p' | 'span' | 'div' | 'label' | 'li' | 'td' | 'th' | 'figcaption' | 'blockquote' | 'cite';
|
|
3
|
-
export interface BodyProps<T extends React.ElementType = 'p'> {
|
|
4
|
-
as?: T & BodyElement;
|
|
5
|
-
size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs' | '2xs';
|
|
6
|
-
color?: string;
|
|
7
|
-
fontWeight?: 'normal' | 'bold';
|
|
8
|
-
}
|
|
9
|
-
export type BodyPropsWithElement<T extends React.ElementType = 'p'> = BodyProps<T> & Omit<React.ComponentPropsWithoutRef<T>, keyof BodyProps<T>>;
|
|
10
|
-
export declare const Body: React.ForwardRefExoticComponent<BodyProps<BodyElement> & Omit<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">, keyof BodyProps<T>> & React.RefAttributes<HTMLElement>>;
|
|
11
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Body';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type DisplayProps = {
|
|
3
|
-
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
4
|
-
size?: 'lg' | 'md' | 'sm';
|
|
5
|
-
color?: string;
|
|
6
|
-
} & React.HTMLAttributes<HTMLHeadingElement>;
|
|
7
|
-
export declare const Display: React.ForwardRefExoticComponent<{
|
|
8
|
-
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
9
|
-
size?: "lg" | "md" | "sm";
|
|
10
|
-
color?: string;
|
|
11
|
-
} & React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Display';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type HeadingProps = {
|
|
3
|
-
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
4
|
-
size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs' | '2xs';
|
|
5
|
-
color?: string;
|
|
6
|
-
} & React.HTMLAttributes<HTMLHeadingElement>;
|
|
7
|
-
export declare const Heading: React.ForwardRefExoticComponent<{
|
|
8
|
-
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
9
|
-
size?: "xl" | "lg" | "md" | "sm" | "xs" | "2xs";
|
|
10
|
-
color?: string;
|
|
11
|
-
} & React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Heading';
|
package/lib/primitive/index.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface PrimitiveProps {
|
|
3
|
-
asChild?: boolean;
|
|
4
|
-
}
|
|
5
|
-
type PropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & PrimitiveProps;
|
|
6
|
-
declare function createPrimitive<E extends React.ElementType>(element: E): React.ForwardRefExoticComponent<PropsWithRef<E>>;
|
|
7
|
-
declare const Primitive: {
|
|
8
|
-
div: React.ForwardRefExoticComponent<PropsWithRef<"div">>;
|
|
9
|
-
span: React.ForwardRefExoticComponent<PropsWithRef<"span">>;
|
|
10
|
-
button: React.ForwardRefExoticComponent<PropsWithRef<"button">>;
|
|
11
|
-
input: React.ForwardRefExoticComponent<PropsWithRef<"input">>;
|
|
12
|
-
form: React.ForwardRefExoticComponent<PropsWithRef<"form">>;
|
|
13
|
-
label: React.ForwardRefExoticComponent<PropsWithRef<"label">>;
|
|
14
|
-
p: React.ForwardRefExoticComponent<PropsWithRef<"p">>;
|
|
15
|
-
h1: React.ForwardRefExoticComponent<PropsWithRef<"h1">>;
|
|
16
|
-
h2: React.ForwardRefExoticComponent<PropsWithRef<"h2">>;
|
|
17
|
-
h3: React.ForwardRefExoticComponent<PropsWithRef<"h3">>;
|
|
18
|
-
h4: React.ForwardRefExoticComponent<PropsWithRef<"h4">>;
|
|
19
|
-
h5: React.ForwardRefExoticComponent<PropsWithRef<"h5">>;
|
|
20
|
-
h6: React.ForwardRefExoticComponent<PropsWithRef<"h6">>;
|
|
21
|
-
section: React.ForwardRefExoticComponent<PropsWithRef<"section">>;
|
|
22
|
-
article: React.ForwardRefExoticComponent<PropsWithRef<"article">>;
|
|
23
|
-
header: React.ForwardRefExoticComponent<PropsWithRef<"header">>;
|
|
24
|
-
footer: React.ForwardRefExoticComponent<PropsWithRef<"footer">>;
|
|
25
|
-
main: React.ForwardRefExoticComponent<PropsWithRef<"main">>;
|
|
26
|
-
nav: React.ForwardRefExoticComponent<PropsWithRef<"nav">>;
|
|
27
|
-
aside: React.ForwardRefExoticComponent<PropsWithRef<"aside">>;
|
|
28
|
-
ul: React.ForwardRefExoticComponent<PropsWithRef<"ul">>;
|
|
29
|
-
ol: React.ForwardRefExoticComponent<PropsWithRef<"ol">>;
|
|
30
|
-
li: React.ForwardRefExoticComponent<PropsWithRef<"li">>;
|
|
31
|
-
img: React.ForwardRefExoticComponent<PropsWithRef<"img">>;
|
|
32
|
-
a: React.ForwardRefExoticComponent<PropsWithRef<"a">>;
|
|
33
|
-
strong: React.ForwardRefExoticComponent<PropsWithRef<"strong">>;
|
|
34
|
-
em: React.ForwardRefExoticComponent<PropsWithRef<"em">>;
|
|
35
|
-
small: React.ForwardRefExoticComponent<PropsWithRef<"small">>;
|
|
36
|
-
table: React.ForwardRefExoticComponent<PropsWithRef<"table">>;
|
|
37
|
-
thead: React.ForwardRefExoticComponent<PropsWithRef<"thead">>;
|
|
38
|
-
tbody: React.ForwardRefExoticComponent<PropsWithRef<"tbody">>;
|
|
39
|
-
tr: React.ForwardRefExoticComponent<PropsWithRef<"tr">>;
|
|
40
|
-
td: React.ForwardRefExoticComponent<PropsWithRef<"td">>;
|
|
41
|
-
th: React.ForwardRefExoticComponent<PropsWithRef<"th">>;
|
|
42
|
-
};
|
|
43
|
-
export { createPrimitive, Primitive };
|
|
44
|
-
export type { PropsWithRef };
|