@fvc/card 1.1.0 → 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.
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Card } from './Card';
|
|
1
|
+
export { Card, prefixCls } from './Card';
|
package/dist/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import e,{memo as r}from"react";import{Card as t}from"antd";import{cssVarResolver as n}from"@fvc/utils";import{Box as o}from"@fvc/box";import{Typography as a}from"@fvc/typography";
|
|
1
|
+
import e,{memo as r}from"react";import{Card as t}from"antd";import{cssVarResolver as n}from"@fvc/utils";import{Box as o}from"@fvc/box";import{Typography as a}from"@fvc/typography";function i(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t}function d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var c,l={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 p
|
|
6
|
+
*/var s,p=(c||(c=1,s=l,function(){var e={}.hasOwnProperty;function r(){for(var e="",r=0;r<arguments.length;r++){var o=arguments[r];o&&(e=n(e,t(o)))}return e}function t(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return r.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var o="";for(var a in t)e.call(t,a)&&t[a]&&(o=n(o,a));return o}function n(e,r){return r?e?e+" "+r:e+r:e}s.exports?(r.default=r,s.exports=r):window.classNames=r}()),l.exports),f=d(p);function v(e){const{minHeight:r,height:t,borderColor:o,scroll:a}=e,i={};return void 0!==r&&(i.minHeight=n(r)),void 0!==t&&(i.height=n(t)),o&&(i.borderColor=o),a&&(i.overflowY="auto"),i}var b=r((({children:r,testId:t,icon:n,isEnableMargin:i=!0})=>e.createElement(o.Row,{className:i?"mt-3":""},e.createElement(a.Text,{"data-testd":t,font:"Roboto",className:"mr-2",size:14,weight:400,lineHeight:"16"},r,n))));var m=r((({children:r,testId:t})=>e.createElement(a.Text,{font:"Montserrat",className:"mb-3","data-testid":t,size:20,weight:700,lineHeight:"20"},r)));var u=r((r=>{var{children:t="",className:n,color:d="var(--body-text-color-1000)",icon:c=e.createElement(e.Fragment,null),iconPosition:l="right",lineHeight:s=20,size:p=16,testId:v,weight:b=500}=r,m=i(r,["children","className","color","icon","iconPosition","lineHeight","size","testId","weight"]);return e.createElement(o.Row,{className:null!=n?n:"mt-1"},"number"==typeof t||"string"==typeof t?e.createElement(a.Text,Object.assign({font:"Roboto",color:d,size:p,weight:b,lineHeight:s,testId:v,className:f({[`fvc-card-value-icon-${l}`]:!!l})},m),c,t):t)}));!function(e,r){void 0===r&&(r={});var t=r.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('.fvc-card {\n font-family: "Montserrat", sans-serif;\n background: var(--blue-20);\n border-radius: 8px;\n}\n.fvc-card-wrapper {\n position: relative;\n}\n.fvc-card-head {\n padding: 0 16px;\n font-weight: 500;\n}\n.fvc-card-body {\n padding: 16px;\n}\n.fvc-card-block {\n width: 100%;\n}\n.fvc-card-border-16 {\n border-radius: 16px;\n}\n.fvc-card-border-32 {\n border-radius: 32px;\n}\n.fvc-card-no-border-radius {\n border-radius: 0;\n}\n.fvc-card-with-border {\n border: 1px solid;\n}\n.fvc-card-overlay {\n position: absolute;\n top: 0;\n height: 100%;\n border-radius: 8px;\n cursor: pointer;\n background-color: rgba(176, 0, 32, 0.16);\n}\n.fvc-card-type-tab, .fvc-card-type-round {\n color: var(--body-text-color-1000);\n background: var(--neutral-0);\n min-height: calc(100vh - 110px);\n}\n.fvc-card-type-tab {\n border-radius: 0 16px 16px;\n}\n.fvc-card-type-round {\n border-radius: 16px;\n}\n.fvc-card-type-inner {\n background-color: var(--neutral-0) !important;\n display: inline-block;\n width: 100%;\n}\n.fvc-card-type-inner-head {\n padding: 0 16px;\n background-color: var(--neutral-0) !important;\n}\n.fvc-card-type-inner-head-title {\n padding: 16px 0;\n font-size: 16px;\n}\n.fvc-card-type-inner-body {\n padding: 16px;\n}\n.fvc-card-type-inner-extra {\n padding: 17.5px 0;\n}\n.fvc-card-theme {\n background: var(--theme-primary) !important;\n}\n.fvc-card-theme .vis-table-thead > tr > th {\n background: var(--theme-secondary) !important;\n}\n.fvc-card-theme .vis-table-tbody > tr.vis-table-row > td {\n background: var(--theme-primary) !important;\n}\n.fvc-card-theme .vis-table-tbody > tr.vis-table-row > td.el-table-head {\n background: var(--theme-secondary) !important;\n}\n.fvc-card-theme .vis-table-tbody > tr.vis-table-row:not(.vis-table-row-level-0) > td {\n background: var(--theme-secondary) !important;\n}\n.fvc-card-value-icon-left {\n display: flex;\n flex-direction: row;\n}\n.fvc-card-value-icon-right {\n display: flex;\n flex-direction: row-reverse;\n}');const h="fvc-card",y=r=>{var{type:n,testId:o,minHeight:a,height:d,bordered:c=!1,disableBorderRadius:l=!1,borderColor:s,border:p,scroll:b,isActiveTheme:m=!1,overlay:u=!1}=r,y=i(r,["type","testId","minHeight","height","bordered","disableBorderRadius","borderColor","border","scroll","isActiveTheme","overlay"]);const g="inner"===n?n:void 0,x=f(h,{[`${h}-type-${n}`]:n,[`${h}-theme`]:m,[`${h}-with-border`]:!!s,[`${h}-border-${p}`]:p,[`${h}-no-border-radius`]:l},y.className);return e.createElement("div",{className:`${h}-wrapper`},e.createElement(t,Object.assign({"data-testid":o},y,{prefixCls:h,type:g,bordered:c,style:Object.assign(Object.assign({},v({minHeight:a,height:d,borderColor:s,scroll:b})),y.style),className:x})),u&&e.createElement("div",{role:"presentation",className:`${h}-overlay ${h}-block`}))};y.Title=m,y.Label=b,y.Value=u;export{y as Card,h as prefixCls};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fvc/card",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"main": "./dist/lib/index.js",
|
|
5
5
|
"types": "./dist/lib/card/src/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -22,10 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"react": "^18.0.0",
|
|
25
|
-
"antd": "^5.0.0"
|
|
26
|
-
"@fvc/box": "file:../box",
|
|
27
|
-
"@fvc/typography": "file:../typography",
|
|
28
|
-
"@fvc/utils": "file:../utils"
|
|
25
|
+
"antd": "^5.0.0"
|
|
29
26
|
},
|
|
30
27
|
"peerDependencies": {
|
|
31
28
|
"@fvc/box": "*",
|