@flatbiz/antd 4.4.0 → 4.4.1

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
- .block-layout{background-color:var(--block-bg-color)}.light-theme .block-layout{color:rgba(0,0,0,.88)}.dark-theme .block-layout{color:hsla(0,0%,100%,.85)}.card-layout{border-radius:6px;padding:15px}.card-layout-title-sign{padding-left:10px;position:relative}.card-layout-title-sign:before{background:var(--color-primary);border-radius:3px;content:"";height:14px;left:0;margin-top:-7px;position:absolute;top:50%;width:3px}.card-layout-title{align-items:center;display:flex;position:relative}.card-layout-title-content{flex:1;font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-layout-title-extra{margin-left:15px}.card-layout-desc,.card-layout-desc-list{font-size:12px;opacity:.7}.card-layout+.card-layout,.card-layout-content{margin-top:8px}.card-layout-title-fixed{display:flex;flex-direction:column;height:100%;overflow:hidden}.card-layout-title-fixed>.card-layout-content{flex:1;overflow-y:auto}.card-layout-small{padding:8px 15px}.card-layout-small .card-layout-content{margin-top:0}.card-layout-tight{border-radius:0;padding:0}
1
+ .block-layout{background-color:var(--block-bg-color)}.light-theme .block-layout{color:rgba(0,0,0,.88)}.dark-theme .block-layout{color:hsla(0,0%,100%,.85)}.card-layout{border-radius:6px;padding:15px}.card-layout-title-sign{padding-left:10px;position:relative}.card-layout-title-sign:before{background:var(--color-primary);border-radius:3px;content:"";height:14px;left:0;margin-top:-7px;position:absolute;top:50%;width:3px}.card-layout-title{align-items:center;display:flex;position:relative}.card-layout-title+.card-layout-content{margin-top:8px}.card-layout-title-content{flex:1;font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-layout-title-extra{margin-left:15px}.card-layout-desc,.card-layout-desc-list{font-size:12px;opacity:.7}.card-layout+.card-layout,.card-layout-desc+.card-layout-content,.card-layout-desc-list+.card-layout-content{margin-top:8px}.card-layout-title-fixed{display:flex;flex-direction:column;height:100%;overflow:hidden}.card-layout-title-fixed>.card-layout-content{flex:1;overflow-y:auto}.card-layout-small{padding:8px 15px}.card-layout-small .card-layout-content{margin-top:0}.card-layout-tight{border-radius:0;padding:0}
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable */
2
2
  import './index.css';
3
3
  /*! @flatjs/forge MIT @flatbiz/antd */
4
- import{isArray as t}from"@dimjs/lang/cjs/is-array";import{extend as e}from"@dimjs/utils/cjs/extend";import{classNames as l}from"@dimjs/utils/cjs/class-names";import{Space as i}from"antd";import{Fragment as a}from"react";import{B as r}from"../index-1f45bfd5.js";import{jsx as d,jsxs as s}from"react/jsx-runtime";import"../_rollupPluginBabelHelpers-a0769acd.js";var c=function c(n){var o;var u=l("card-layout",{"card-layout-tight":n.layoutType==="tight","card-layout-title-fixed":n.titleFixed,"card-layout-small":n.size==="small"},n.className);var m=e(n.style,{padding:n.padding,width:n.width,height:n.height,overflowY:!n.titleFixed&&(n.height||(o=n.style)!=null&&o.height)?"auto":undefined});if(n.hidden)return d(a,{});return s(r,{className:u,style:m,onClick:n.onClick,children:[s("div",{className:l("card-layout-title",{"card-layout-title-sign":n.titleLeftLine}),style:n.titleStyle,children:[d("div",{className:"card-layout-title-content",style:n.titleContentStyle,children:n.title}),n.titleExtra?d("div",{className:"card-layout-title-extra",style:n.titleExtraStyle,children:n.titleExtra}):null]}),n.desc&&!t(n.desc)?d("div",{className:"card-layout-desc",children:n.desc}):null,n.desc&&t(n.desc)?d("div",{className:"card-layout-desc-list",children:d(i,{direction:"vertical",size:0,children:n.desc.map((function(t,e){return d(a,{children:t},e)}))})}):null,n.children?d("div",{className:"card-layout-content",style:n.contentStyle,children:n.children}):null]})};c.defaultProps={titleLeftLine:true,layoutType:"layer"};export{c as CardLayout};
4
+ import{isArray as t}from"@dimjs/lang/cjs/is-array";import{extend as e}from"@dimjs/utils/cjs/extend";import{classNames as l}from"@dimjs/utils/cjs/class-names";import{Space as i}from"antd";import{Fragment as a}from"react";import{B as r}from"../index-1f45bfd5.js";import{jsx as d,jsxs as s}from"react/jsx-runtime";import"../_rollupPluginBabelHelpers-a0769acd.js";var c=function c(n){var o;var u=l("card-layout",{"card-layout-tight":n.layoutType==="tight","card-layout-title-fixed":n.titleFixed,"card-layout-small":n.size==="small"},n.className);var m=e(n.style,{padding:n.padding,width:n.width,height:n.height,overflowY:!n.titleFixed&&(n.height||(o=n.style)!=null&&o.height)?"auto":undefined});if(n.hidden)return d(a,{});return s(r,{className:u,style:m,onClick:n.onClick,children:[n.title||n.titleExtra?s("div",{className:l("card-layout-title",{"card-layout-title-sign":n.title?n.titleLeftLine:false}),style:n.titleStyle,children:[d("div",{className:"card-layout-title-content",style:n.titleContentStyle,children:n.title}),n.titleExtra?d("div",{className:"card-layout-title-extra",style:n.titleExtraStyle,children:n.titleExtra}):null]}):null,n.desc&&!t(n.desc)?d("div",{className:"card-layout-desc",children:n.desc}):null,n.desc&&t(n.desc)?d("div",{className:"card-layout-desc-list",children:d(i,{direction:"vertical",size:0,children:n.desc.map((function(t,e){return d(a,{children:t},e)}))})}):null,n.children?d("div",{className:"card-layout-content",style:n.contentStyle,children:n.children}):null]})};c.defaultProps={titleLeftLine:true,layoutType:"layer"};export{c as CardLayout};
5
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["@flatbiz/antd/src/card-layout/card-layout.tsx"],"sourcesContent":["import { isArray } from '@dimjs/lang';\nimport { classNames, extend } from '@dimjs/utils';\nimport { Space } from 'antd';\nimport { Fragment, type CSSProperties, type ReactElement, type ReactNode } from 'react';\nimport { BlockLayout } from '../block-layout';\nimport './style.less';\n\nexport type CardLayoutProps = {\n desc?: string | string[] | ReactElement | ReactElement[];\n title?: string | ReactElement;\n /**\n * layoutType 布局类型\n * ```\n * 1. layer:分层布局\n * 2. tight:紧凑布局(没有外边距)\n * ```\n */\n layoutType?: 'layer' | 'tight';\n /** 隐藏标题左侧符号 */\n titleLeftLine?: boolean;\n titleStyle?: CSSProperties;\n titleContentStyle?: CSSProperties;\n titleExtraStyle?: CSSProperties;\n contentStyle?: CSSProperties;\n /** 优先级大于 style padding */\n padding?: CSSProperties['padding'];\n /** 优先级大于 style width */\n width?: CSSProperties['width'];\n /** 优先级大于 style height */\n height?: CSSProperties['height'];\n /** 标题右侧布局 */\n titleExtra?: string | ReactElement;\n /** 当存在滚动条时,标题固定,滚动区域为内部部分 */\n titleFixed?: boolean;\n /**\n * 间距尺寸\n * 1. default = 15\n * 2. small = 8\n */\n size?: 'default' | 'small';\n onClick?: (event) => void;\n hidden?: boolean;\n className?: string;\n style?: CSSProperties;\n children?: ReactNode;\n};\n\n/**\n * 卡片结构布局,替代 SimpleLayout 组件\n * @param props\n * @returns\n * ```\n * 1. layoutType 布局类型\n * layer:分层布局\n * tight:紧凑布局(没有外边距)\n * ```\n */\nexport const CardLayout = (props: CardLayoutProps) => {\n const className = classNames(\n 'card-layout',\n {\n 'card-layout-tight': props.layoutType === 'tight',\n // 'card-layout-formlabel-left': labelAlign === 'left',\n 'card-layout-title-fixed': props.titleFixed,\n 'card-layout-small': props.size === 'small',\n },\n props.className,\n );\n\n // const theme = fbaHooks.useThemeToken();\n const style = extend(\n // { '--card-layout-colorPrimary': theme.colorPrimary },\n props.style,\n {\n padding: props.padding,\n width: props.width,\n height: props.height,\n overflowY: !props.titleFixed && (props.height || props.style?.height) ? 'auto' : undefined,\n },\n );\n\n if (props.hidden) return <Fragment />;\n\n return (\n <BlockLayout className={className} style={style} onClick={props.onClick}>\n <div\n className={classNames('card-layout-title', {\n 'card-layout-title-sign': props.titleLeftLine,\n })}\n style={props.titleStyle}\n >\n <div className=\"card-layout-title-content\" style={props.titleContentStyle}>\n {props.title}\n </div>\n {props.titleExtra ? (\n <div className=\"card-layout-title-extra\" style={props.titleExtraStyle}>\n {props.titleExtra}\n </div>\n ) : null}\n </div>\n {props.desc && !isArray(props.desc) ? <div className=\"card-layout-desc\">{props.desc}</div> : null}\n {props.desc && isArray(props.desc) ? (\n <div className=\"card-layout-desc-list\">\n <Space direction=\"vertical\" size={0}>\n {(props.desc as string[]).map((item, index) => {\n return <Fragment key={index}>{item}</Fragment>;\n })}\n </Space>\n </div>\n ) : null}\n {props.children ? (\n <div className=\"card-layout-content\" style={props.contentStyle}>\n {props.children}\n </div>\n ) : null}\n </BlockLayout>\n );\n};\n\nCardLayout.defaultProps = {\n titleLeftLine: true,\n layoutType: 'layer',\n};\n"],"names":["CardLayout","props","_props$style","className","_classNames","layoutType","titleFixed","size","style","_extend","padding","width","height","overflowY","undefined","hidden","_jsx","Fragment","_jsxs","BlockLayout","onClick","children","titleLeftLine","titleStyle","titleContentStyle","title","titleExtra","titleExtraStyle","desc","_isArray","Space","direction","map","item","index","contentStyle","defaultProps"],"mappings":";4WAyDaA,EAAa,SAAbA,EAAcC,GAA2B,IAAAC,EACpD,IAAMC,EAAYC,EAChB,cACA,CACE,oBAAqBH,EAAMI,aAAe,QAE1C,0BAA2BJ,EAAMK,WACjC,oBAAqBL,EAAMM,OAAS,SAEtCN,EAAME,WAIR,IAAMK,EAAQC,EAEZR,EAAMO,MACN,CACEE,QAAST,EAAMS,QACfC,MAAOV,EAAMU,MACbC,OAAQX,EAAMW,OACdC,WAAYZ,EAAMK,aAAeL,EAAMW,SAAMV,EAAID,EAAMO,QAANN,MAAAA,EAAaU,QAAU,OAASE,YAIrF,GAAIb,EAAMc,OAAQ,OAAOC,EAACC,EAAQ,CAAE,GAEpC,OACEC,EAACC,EAAW,CAAChB,UAAWA,EAAWK,MAAOA,EAAOY,QAASnB,EAAMmB,QAAQC,UACtEH,EAAA,MAAA,CACEf,UAAWC,EAAW,oBAAqB,CACzC,yBAA0BH,EAAMqB,gBAElCd,MAAOP,EAAMsB,WAAWF,UAExBL,EAAA,MAAA,CAAKb,UAAU,4BAA4BK,MAAOP,EAAMuB,kBAAkBH,SACvEpB,EAAMwB,QAERxB,EAAMyB,WACLV,EAAA,MAAA,CAAKb,UAAU,0BAA0BK,MAAOP,EAAM0B,gBAAgBN,SACnEpB,EAAMyB,aAEP,QAELzB,EAAM2B,OAASC,EAAQ5B,EAAM2B,MAAQZ,EAAA,MAAA,CAAKb,UAAU,mBAAkBkB,SAAEpB,EAAM2B,OAAc,KAC5F3B,EAAM2B,MAAQC,EAAQ5B,EAAM2B,MAC3BZ,EAAA,MAAA,CAAKb,UAAU,wBAAuBkB,SACpCL,EAACc,EAAK,CAACC,UAAU,WAAWxB,KAAM,EAAEc,SAChCpB,EAAM2B,KAAkBI,KAAI,SAACC,EAAMC,GACnC,OAAOlB,EAACC,EAAQ,CAAAI,SAAcY,GAARC,UAI1B,KACHjC,EAAMoB,SACLL,EAAA,MAAA,CAAKb,UAAU,sBAAsBK,MAAOP,EAAMkC,aAAad,SAC5DpB,EAAMoB,WAEP,OAGV,EAEArB,EAAWoC,aAAe,CACxBd,cAAe,KACfjB,WAAY"}
1
+ {"version":3,"file":"index.js","sources":["@flatbiz/antd/src/card-layout/card-layout.tsx"],"sourcesContent":["import { isArray } from '@dimjs/lang';\nimport { classNames, extend } from '@dimjs/utils';\nimport { Space } from 'antd';\nimport { Fragment, type CSSProperties, type ReactElement, type ReactNode } from 'react';\nimport { BlockLayout } from '../block-layout';\nimport './style.less';\n\nexport type CardLayoutProps = {\n desc?: string | string[] | ReactElement | ReactElement[];\n title?: string | ReactElement;\n /**\n * layoutType 布局类型\n * ```\n * 1. layer:分层布局\n * 2. tight:紧凑布局(没有外边距)\n * ```\n */\n layoutType?: 'layer' | 'tight';\n /** 隐藏标题左侧符号 */\n titleLeftLine?: boolean;\n titleStyle?: CSSProperties;\n titleContentStyle?: CSSProperties;\n titleExtraStyle?: CSSProperties;\n contentStyle?: CSSProperties;\n /** 优先级大于 style padding */\n padding?: CSSProperties['padding'];\n /** 优先级大于 style width */\n width?: CSSProperties['width'];\n /** 优先级大于 style height */\n height?: CSSProperties['height'];\n /** 标题右侧布局 */\n titleExtra?: string | ReactElement;\n /** 当存在滚动条时,标题固定,滚动区域为内部部分 */\n titleFixed?: boolean;\n /**\n * 间距尺寸\n * 1. default = 15\n * 2. small = 8\n */\n size?: 'default' | 'small';\n onClick?: (event) => void;\n hidden?: boolean;\n className?: string;\n style?: CSSProperties;\n children?: ReactNode;\n};\n\n/**\n * 卡片结构布局,替代 SimpleLayout 组件\n * @param props\n * @returns\n * ```\n * 1. layoutType 布局类型\n * layer:分层布局\n * tight:紧凑布局(没有外边距)\n * ```\n */\nexport const CardLayout = (props: CardLayoutProps) => {\n const className = classNames(\n 'card-layout',\n {\n 'card-layout-tight': props.layoutType === 'tight',\n // 'card-layout-formlabel-left': labelAlign === 'left',\n 'card-layout-title-fixed': props.titleFixed,\n 'card-layout-small': props.size === 'small',\n },\n props.className,\n );\n\n // const theme = fbaHooks.useThemeToken();\n const style = extend(\n // { '--card-layout-colorPrimary': theme.colorPrimary },\n props.style,\n {\n padding: props.padding,\n width: props.width,\n height: props.height,\n overflowY: !props.titleFixed && (props.height || props.style?.height) ? 'auto' : undefined,\n },\n );\n\n if (props.hidden) return <Fragment />;\n\n return (\n <BlockLayout className={className} style={style} onClick={props.onClick}>\n {props.title || props.titleExtra ? (\n <div\n className={classNames('card-layout-title', {\n 'card-layout-title-sign': props.title ? props.titleLeftLine : false,\n })}\n style={props.titleStyle}\n >\n <div className=\"card-layout-title-content\" style={props.titleContentStyle}>\n {props.title}\n </div>\n {props.titleExtra ? (\n <div className=\"card-layout-title-extra\" style={props.titleExtraStyle}>\n {props.titleExtra}\n </div>\n ) : null}\n </div>\n ) : null}\n {props.desc && !isArray(props.desc) ? <div className=\"card-layout-desc\">{props.desc}</div> : null}\n {props.desc && isArray(props.desc) ? (\n <div className=\"card-layout-desc-list\">\n <Space direction=\"vertical\" size={0}>\n {(props.desc as string[]).map((item, index) => {\n return <Fragment key={index}>{item}</Fragment>;\n })}\n </Space>\n </div>\n ) : null}\n {props.children ? (\n <div className=\"card-layout-content\" style={props.contentStyle}>\n {props.children}\n </div>\n ) : null}\n </BlockLayout>\n );\n};\n\nCardLayout.defaultProps = {\n titleLeftLine: true,\n layoutType: 'layer',\n};\n"],"names":["CardLayout","props","_props$style","className","_classNames","layoutType","titleFixed","size","style","_extend","padding","width","height","overflowY","undefined","hidden","_jsx","Fragment","_jsxs","BlockLayout","onClick","children","title","titleExtra","titleLeftLine","titleStyle","titleContentStyle","titleExtraStyle","desc","_isArray","Space","direction","map","item","index","contentStyle","defaultProps"],"mappings":";4WAyDaA,EAAa,SAAbA,EAAcC,GAA2B,IAAAC,EACpD,IAAMC,EAAYC,EAChB,cACA,CACE,oBAAqBH,EAAMI,aAAe,QAE1C,0BAA2BJ,EAAMK,WACjC,oBAAqBL,EAAMM,OAAS,SAEtCN,EAAME,WAIR,IAAMK,EAAQC,EAEZR,EAAMO,MACN,CACEE,QAAST,EAAMS,QACfC,MAAOV,EAAMU,MACbC,OAAQX,EAAMW,OACdC,WAAYZ,EAAMK,aAAeL,EAAMW,SAAMV,EAAID,EAAMO,QAANN,MAAAA,EAAaU,QAAU,OAASE,YAIrF,GAAIb,EAAMc,OAAQ,OAAOC,EAACC,EAAQ,CAAE,GAEpC,OACEC,EAACC,EAAW,CAAChB,UAAWA,EAAWK,MAAOA,EAAOY,QAASnB,EAAMmB,QAAQC,SAAA,CACrEpB,EAAMqB,OAASrB,EAAMsB,WACpBL,EAAA,MAAA,CACEf,UAAWC,EAAW,oBAAqB,CACzC,yBAA0BH,EAAMqB,MAAQrB,EAAMuB,cAAgB,QAEhEhB,MAAOP,EAAMwB,WAAWJ,UAExBL,EAAA,MAAA,CAAKb,UAAU,4BAA4BK,MAAOP,EAAMyB,kBAAkBL,SACvEpB,EAAMqB,QAERrB,EAAMsB,WACLP,EAAA,MAAA,CAAKb,UAAU,0BAA0BK,MAAOP,EAAM0B,gBAAgBN,SACnEpB,EAAMsB,aAEP,QAEJ,KACHtB,EAAM2B,OAASC,EAAQ5B,EAAM2B,MAAQZ,EAAA,MAAA,CAAKb,UAAU,mBAAkBkB,SAAEpB,EAAM2B,OAAc,KAC5F3B,EAAM2B,MAAQC,EAAQ5B,EAAM2B,MAC3BZ,EAAA,MAAA,CAAKb,UAAU,wBAAuBkB,SACpCL,EAACc,EAAK,CAACC,UAAU,WAAWxB,KAAM,EAAEc,SAChCpB,EAAM2B,KAAkBI,KAAI,SAACC,EAAMC,GACnC,OAAOlB,EAACC,EAAQ,CAAAI,SAAcY,GAARC,UAI1B,KACHjC,EAAMoB,SACLL,EAAA,MAAA,CAAKb,UAAU,sBAAsBK,MAAOP,EAAMkC,aAAad,SAC5DpB,EAAMoB,WAEP,OAGV,EAEArB,EAAWoC,aAAe,CACxBZ,cAAe,KACfnB,WAAY"}
@@ -1 +1 @@
1
- .text-overflow,.tow-content{overflow:hidden;width:100%}.tow-content{display:inline-block;position:relative;text-align:left;text-overflow:ellipsis;white-space:nowrap}.tow-hidden{display:inline-block;height:0;left:0;overflow:hidden;position:absolute;top:0;width:0}.tow-hidden span{white-space:nowrap}.tow-hidden span,.tow-inner-text{display:inline-block}.tow-trigger .tow-content,.tow-trigger .tow-cut-content{color:#1677ff;transition:color .3s}.tow-trigger .tow-show-text{cursor:pointer}.tow-trigger .tow-show-text:hover{color:#69b1ff}
1
+ .text-overflow{display:flex;overflow:hidden;width:100%}.tow-content{position:relative;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:100%}.tow-content,.tow-hidden{display:inline-block;overflow:hidden}.tow-hidden{height:0;left:0;position:absolute;top:0;width:0}.tow-hidden span{white-space:nowrap}.tow-hidden span,.tow-inner-text{display:inline-block}.tow-trigger .tow-content,.tow-trigger .tow-cut-content{color:#1677ff;transition:color .3s}.tow-trigger .tow-show-text{cursor:pointer}.tow-trigger .tow-show-text:hover{color:#69b1ff}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "4.4.0",
3
+ "version": "4.4.1",
4
4
  "description": "flat-biz ui components",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",