najwer23morsels 1.7.0 → 1.8.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/CHANGELOG.md
CHANGED
package/lib/TextBox/TextBox.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
type TextBoxOwnProps = {
|
|
1
|
+
export type TextBoxOwnProps = {
|
|
2
2
|
children?: React.ReactNode;
|
|
3
|
-
mobileSize: number;
|
|
4
|
-
desktopSize: number;
|
|
3
|
+
mobileSize: number | 'inherit';
|
|
4
|
+
desktopSize: number | 'inherit';
|
|
5
5
|
lineHeight?: number | string;
|
|
6
6
|
color?: React.CSSProperties['color'];
|
|
7
7
|
colorHover?: React.CSSProperties['color'];
|
package/lib/TextBox/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TextBox } from './TextBox';
|
|
2
|
-
export { TextBox };
|
|
1
|
+
import { TextBox, type TextBoxOwnProps } from './TextBox';
|
|
2
|
+
export { TextBox, type TextBoxOwnProps };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type TextBoxOwnProps } from '../TextBox';
|
|
2
|
+
export type TypographyVariant = 'display' | 'heading' | 'subheading' | 'body' | 'caption' | 'link';
|
|
3
|
+
export type TypographyAppearance = 'light' | 'dark';
|
|
4
|
+
type TypographyPreset = Omit<TextBoxOwnProps, 'children'> & {
|
|
5
|
+
tag?: React.ElementType;
|
|
6
|
+
letterSpacing?: React.CSSProperties['letterSpacing'];
|
|
7
|
+
};
|
|
8
|
+
type TypographyProps = Partial<TypographyPreset> & {
|
|
9
|
+
variant: TypographyVariant;
|
|
10
|
+
appearance?: TypographyAppearance;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
href?: string;
|
|
14
|
+
target?: React.HTMLAttributeAnchorTarget;
|
|
15
|
+
rel?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const Typography: {
|
|
18
|
+
({ variant, appearance, style, color, colorHover, ...overrides }: TypographyProps): import("react").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{T as o}from"./TextBox-__k4jPYK.js";import"./style-inject.es-CrVRO2OA.js";const i={display:{tag:"h1",mobileSize:42,desktopSize:76,lineHeight:1.05,fontWeight:700,textWrap:"balance",margin:"clamp(40px, 8vw, 60px) 0 10px"},heading:{tag:"h2",mobileSize:30,desktopSize:52,fontWeight:650,lineHeight:1.1,textWrap:"balance",margin:"clamp(30px, 8vw, 40px) 0 5px"},subheading:{tag:"h3",mobileSize:20,desktopSize:26,lineHeight:1.25,fontWeight:500,margin:"30px 0 0"},body:{tag:"p",mobileSize:16,desktopSize:17,fontWeight:400,margin:"10px 0 0"},caption:{tag:"span",mobileSize:11,desktopSize:12,lineHeight:1,fontWeight:600,margin:0,style:{textTransform:"uppercase"}},link:{tag:"a",mobileSize:"inherit",desktopSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit",fontWeight:"inherit",margin:0}},t={light:{display:{color:"#0F1014"},heading:{color:"#14151A"},subheading:{color:"#3f4043"},body:{color:"#26272E"},caption:{color:"#6B6D76"},link:{color:"orangered",hover:"orangered"}},dark:{display:{color:"#FFFFFF"},heading:{color:"#F7F8FA"},subheading:{color:"#9A9DAA"},body:{color:"#F7F7F8"},caption:{color:"#9A9DAA"},link:{color:"orangered",hover:"orangered"}}},r=({variant:r,appearance:a="light",style:n,color:l,colorHover:p,...g})=>{const c=i[r],h=t[a][r];return e(o,{...c,...g,color:l??h.color,colorHover:p??h.hover,style:{...c.style,...n}})};r.displayName="Typography";export{r as Typography};
|