@zonos/amino 5.2.16 → 5.2.17
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/components/text/Text.d.ts +8 -2
- package/components/text/Text.js +1 -1
- package/package.json +1 -1
- package/reset.css +0 -2
|
@@ -4,11 +4,17 @@ import type { BaseProps } from "../../types/BaseProps";
|
|
|
4
4
|
export declare const textOthers: readonly ["code", "subtitle", "small-header", "input-label"];
|
|
5
5
|
type OtherText = (typeof textOthers)[number];
|
|
6
6
|
export declare const textOptions: readonly [{
|
|
7
|
-
readonly label: "Page Header (3XL) ·
|
|
7
|
+
readonly label: "Page Header (3XL) · 30px (1.875rem)";
|
|
8
8
|
readonly size: "3xl";
|
|
9
|
-
readonly tag: "
|
|
9
|
+
readonly tag: "h1";
|
|
10
10
|
readonly type: "page-header";
|
|
11
11
|
readonly weight: 700;
|
|
12
|
+
}, {
|
|
13
|
+
readonly label: "Secondary Page Header (3XL) · 30px (1.875rem)";
|
|
14
|
+
readonly size: "3xl";
|
|
15
|
+
readonly tag: "h2";
|
|
16
|
+
readonly type: "secondary-page-header";
|
|
17
|
+
readonly weight: 500;
|
|
12
18
|
}, {
|
|
13
19
|
readonly label: "Header (2XL) · 28px (1.75rem)";
|
|
14
20
|
readonly size: "2xl";
|
package/components/text/Text.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-bd4862e8.js"),t=require("react/jsx-runtime"),a=require("clsx"),i=require("../../styles/constants/theme.js"),s=require("../../style-inject.es-d4ddeae4.js");function r(e){return e&&e.__esModule?e:{default:e}}var n=r(a),l="Amino_Text-module__subTitle--ar8xY",h="Amino_Text-module__inputLabel--7RwJ6",o="Amino_Text-module__typography--Ucf02";s.styleInject(".Amino_Text-module__subTitle--ar8xY{color:var(--amino-gray-900);font-size:var(--amino-font-size-s);line-height:16px}.Amino_Text-module__inputLabel--7RwJ6{color:var(--amino-gray-1200);display:block;font-family:var(--amino-font-sans);font-size:14px;font-weight:400;line-height:16px;margin-bottom:8px}.Amino_Text-module__typography--Ucf02{color:var(--amino-text-color);font-size:var(--amino-text-font-size);font-weight:var(--amino-text-font-weight);line-height:var(--amino-text-line-height);margin:0;text-transform:var(--amino-text-transform)}.Amino_Text-module__typography--Ucf02 svg{display:inline-block;vertical-align:middle}");var g=[{label:"Page Header (3XL) ·
|
|
1
|
+
"use strict";var e=require("../../_tslib-bd4862e8.js"),t=require("react/jsx-runtime"),a=require("clsx"),i=require("../../styles/constants/theme.js"),s=require("../../style-inject.es-d4ddeae4.js");function r(e){return e&&e.__esModule?e:{default:e}}var n=r(a),l="Amino_Text-module__subTitle--ar8xY",h="Amino_Text-module__inputLabel--7RwJ6",o="Amino_Text-module__typography--Ucf02";s.styleInject(".Amino_Text-module__subTitle--ar8xY{color:var(--amino-gray-900);font-size:var(--amino-font-size-s);line-height:16px}.Amino_Text-module__inputLabel--7RwJ6{color:var(--amino-gray-1200);display:block;font-family:var(--amino-font-sans);font-size:14px;font-weight:400;line-height:16px;margin-bottom:8px}.Amino_Text-module__typography--Ucf02{color:var(--amino-text-color);font-size:var(--amino-text-font-size);font-weight:var(--amino-text-font-weight);line-height:var(--amino-text-line-height);margin:0;text-transform:var(--amino-text-transform)}.Amino_Text-module__typography--Ucf02 svg{display:inline-block;vertical-align:middle}");var g=[{label:"Page Header (3XL) · 30px (1.875rem)",size:"3xl",tag:"h1",type:"page-header",weight:700},{label:"Secondary Page Header (3XL) · 30px (1.875rem)",size:"3xl",tag:"h2",type:"secondary-page-header",weight:500},{label:"Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",type:"header",weight:600},{label:"Description Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",type:"description-header",weight:700},{label:"Title (XL) • 22px (1.375rem)",size:"xl",tag:"h4",type:"title",weight:600},{label:"Bold Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",type:"bold-subheader",weight:700},{label:"Semi Bold Subheader (L / H4) • 18px (1.125rem)",size:"l",tag:"h5",type:"semi-bold-subheader",weight:600},{label:"Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",type:"subheader",weight:500},{label:"Bold Label (Base) • 14px (.875rem)",size:"base",tag:"span",type:"bold-label",weight:700},{label:"Label (Base) • 14px (.875rem)",size:"base",tag:"span",type:"label",weight:500},{label:"Body (Base) • 14px (.875rem)",size:"base",tag:"span",type:"body",weight:400},{label:"Small header (S) • 12px (.75rem)",size:"s",tag:"span",type:"small-header",weight:600},{label:"Caption (S) • 12px (.75rem)",size:"s",tag:"span",type:"caption",weight:400},{label:"Hint text (XS) • 10px (.625rem)",size:"xs",tag:"span",type:"hint-text",weight:400}],p=e.__read(g,14),c=p[0],d=p[1],m=p[2],u=p[3],x=p[4],b=p[5],z=p[6],f=p[7],_=p[8],w=p[9],y=p[10],U=p[11],v=p[12],W=p[13];exports.Text=function(a){var s=a.children,r=a.className,g=a.color,p=a.fontSize,j=a.fontWeight,L=a.isUppercase,T=a.lineHeight,S=a.style,A=a.tag,B=a.title,H=function(a){var l=a.as,h=a.fontWeight,c=a.isUppercase,d=a.size,m={className:n.default(r,o),style:e.__assign(e.__assign({},S),{"--amino-text-color":g?i.theme[g]:"inherit","--amino-text-font-size":"var(--amino-font-size-".concat(p||d,")"),"--amino-text-font-weight":h||"","--amino-text-line-height":"var(--amino-line-height-".concat(T||d,")"),"--amino-text-transform":c?"uppercase":"inherit"}),title:B};switch(l){case"h1":return t.jsx("h1",e.__assign({},m,{children:s}));case"h2":return t.jsx("h2",e.__assign({},m,{children:s}));case"h3":return t.jsx("h3",e.__assign({},m,{children:s}));case"h4":return t.jsx("h4",e.__assign({},m,{children:s}));case"h5":return t.jsx("h5",e.__assign({},m,{children:s}));default:return t.jsx("span",e.__assign({},m,{children:s}))}};switch(a.type){case"page-header":return H({as:A||c.tag,fontWeight:j||c.weight,isUppercase:L,size:c.size});case"secondary-page-header":return H({as:A||d.tag,fontWeight:j||d.weight,isUppercase:L,size:d.size});case"header":return H({as:A||m.tag,fontWeight:j||m.weight,isUppercase:L,size:m.size});case"description-header":return H({as:A||u.tag,fontWeight:j||u.weight,isUppercase:L,size:u.size});case"title":return H({as:A||x.tag,fontWeight:j||x.weight,isUppercase:L,size:x.size});case"bold-subheader":return H({as:A||b.tag,fontWeight:j||b.weight,isUppercase:L,size:b.size});case"semi-bold-subheader":return H({as:A||z.tag,fontWeight:j||z.weight,isUppercase:L,size:z.size});case"subheader":return H({as:A||f.tag,fontWeight:j||f.weight,isUppercase:L,size:f.size});case"bold-label":return H({as:A||_.tag,fontWeight:j||_.weight,isUppercase:L,size:_.size});case"label":return H({as:A||w.tag,fontWeight:j||w.weight,isUppercase:L,size:w.size});case"small-header":return H({as:A||U.tag,fontWeight:j||U.weight,isUppercase:L,size:U.size});case"caption":return H({as:A||v.tag,fontWeight:j||v.weight,isUppercase:L,size:v.size});case"hint-text":return H({as:A||W.tag,fontWeight:j||W.weight,isUppercase:L,size:W.size});case"subtitle":return t.jsx("span",{className:n.default(r,l),title:B,children:s});case"input-label":return t.jsx("span",{className:n.default(r,h),title:B,children:s});default:return H({as:A||y.tag,fontWeight:j||y.weight,isUppercase:L,size:y.size})}},exports.textOptions=g,exports.textOthers=["code","subtitle","small-header","input-label"];
|
package/package.json
CHANGED