@fvc/typography 1.0.1 → 1.2.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/dist/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import t,{useMemo as
|
|
1
|
+
import t,{useMemo as e}from"react";import{Typography as r}from"antd";import{cssVarResolver as o}from"@fvc/utils";function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}"function"==typeof SuppressedError&&SuppressedError;var a,p={exports:{}};
|
|
2
2
|
/*!
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
5
5
|
http://jedwatson.github.io/classnames
|
|
6
|
-
*/var
|
|
6
|
+
*/var l,i=n((a||(a=1,l=p,function(){var t={}.hasOwnProperty;function e(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=o(t,r(n)))}return t}function r(r){if("string"==typeof r||"number"==typeof r)return r;if("object"!=typeof r)return"";if(Array.isArray(r))return e.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var n="";for(var a in r)t.call(r,a)&&r[a]&&(n=o(n,a));return n}function o(t,e){return e?t?t+" "+e:t+e:t}l.exports?(e.default=e,l.exports=e):window.classNames=e}()),p.exports));!function(t,e){void 0===e&&(e={});var r=e.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===r&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}}('.fvc-typography + h1.fvc-typography, .fvc-typography + h2.fvc-typography, .fvc-typography + h3.fvc-typography, .fvc-typography + h4.fvc-typography, .fvc-typography + h5.fvc-typography,\n.fvc-typography p,\n.fvc-typography div {\n margin: 0;\n}\n\n.fvc-typography {\n color: var(--text-color, var(--body-text-color-1000));\n font-family: var(--text-ff, "Roboto", sans-serif);\n}\n\narticle.fvc-typography,\nspan.fvc-typography,\ndiv.fvc-typography {\n color: var(--text-color, var(--body-text-color-1000));\n font-size: var(--text-fz, 16px);\n font-weight: var(--text-fw, 400);\n line-height: var(--text-lh, 20px);\n}\n\na.fvc-typography {\n color: var(--text-color, var(--body-text-color-1000));\n font-size: var(--text-fz, 16px);\n font-weight: var(--text-fw, 400);\n line-height: var(--text-lh, 20px);\n color: var(--text-color, var(--link-on-light-bg-color-500));\n text-decoration: underline;\n}\na.fvc-typography:hover {\n color: var(--text-color, var(--link-on-light-bg-color-500));\n}\n\nh1.fvc-typography {\n color: var(--text-color, var(--body-text-color-1000));\n font-size: var(--text-fz, 32px);\n font-weight: var(--text-fw, 700);\n line-height: var(--text-lh, 32px);\n}\n\nh2.fvc-typography {\n color: var(--text-color, var(--body-text-color-1000));\n font-size: var(--text-fz, 24px);\n font-weight: var(--text-fw, 700);\n line-height: var(--text-lh, 32px);\n}\n\nh3.fvc-typography {\n color: var(--text-color, var(--body-text-color-1000));\n font-size: var(--text-fz, 20px);\n font-weight: var(--text-fw, 700);\n line-height: var(--text-lh, 20px);\n}\n\nh4.fvc-typography {\n color: var(--text-color, var(--body-text-color-1000));\n font-size: var(--text-fz, 13px);\n font-weight: var(--text-fw, 700);\n line-height: var(--text-lh, 17px);\n text-transform: uppercase;\n}\n\nh5.fvc-typography {\n color: var(--text-color, var(--body-text-color-1000));\n font-size: var(--text-fz, 14px);\n font-weight: var(--text-fw, 700);\n line-height: var(--text-lh, 17px);\n}');const c="fvc-typography";function f(r){const n=n=>{var{align:a,color:p,className:l,font:f="Montserrat",lineHeight:y,size:h,testId:v,underline:x=!1,weight:s}=n,g=function(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(t);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(t,o[n])&&(r[o[n]]=t[o[n]])}return r}(n,["align","color","className","font","lineHeight","size","testId","underline","weight"]);const d=i(c,l,{[`${c}-underline`]:x}),u=e((()=>Object.assign({"--text-color":p,"--text-ff":f,"--text-lh":o(y),"--text-fz":o(h),"--text-fw":s,"--text-align":a},g.style)),[a,p,f,y,g.style,h,s]);return t.createElement(r,Object.assign({},g,{prefixCls:c,className:d,"data-test-id":v,style:u}))};return n.displayName=r.displayName,n}const y=f(r),h=f(r.Title),v=f(r.Text),x=f(r.Paragraph),s=f(r.Link);y.Title=h,y.Text=v,y.Paragraph=x,y.Link=s;export{y as Typography};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fvc/typography",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"main": "./dist/lib/index.js",
|
|
5
5
|
"types": "./dist/lib/typography/src/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -18,12 +18,11 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "rm -rf dist && eslint --config ../../eslint.config.js . && bunx tsc --noEmit && rollup -c ./rollup.config.mjs"
|
|
21
|
+
"build": "rm -rf dist && rm -rf .rollup.cache && eslint --config ../../eslint.config.js . && bunx tsc --noEmit && rollup -c ./rollup.config.mjs"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"react": "^18.0.0",
|
|
25
|
-
"antd": "^5.0.0"
|
|
26
|
-
"@fvc/utils": "file:../utils"
|
|
25
|
+
"antd": "^5.0.0"
|
|
27
26
|
},
|
|
28
27
|
"peerDependencies": {
|
|
29
28
|
"@fvc/utils": "*",
|