@flatbiz/antd 4.2.106 → 4.3.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.
@@ -0,0 +1 @@
1
+ .http-svg-view{display:inline-block;line-height:normal;overflow:hidden}.hsv-content{transform:translateX(-200px)}.hsv-content,.hsv-content img{height:100%;width:100%}
@@ -0,0 +1,5 @@
1
+ /* eslint-disable */
2
+ import './index.css';
3
+ /*! @flatjs/forge MIT @flatbiz/antd */
4
+ import{_ as s}from"../_rollupPluginBabelHelpers-a0769acd.js";import{classNames as t}from"@dimjs/utils/cjs/class-names";import{isHttpUri as i}from"@flatbiz/utils";import{jsx as r}from"react/jsx-runtime";var e=function e(l){var a=l.color||"#555";var o=i(l.svgPath)?l.svgPath:"https://file.40017.cn/tcsk/alicon/"+l.svgPath+".svg";return r("div",{className:t("http-svg-view",l.className),style:s({width:l.width||"100%",height:l.height||"100%"},l.style),children:r("div",{className:"hsv-content",style:{filter:"drop-shadow("+a+" 200px 0)"},children:r("img",{src:o})})})};export{e as SvgHttpView};
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["@flatbiz/antd/src/svg-http-view/svg.tsx"],"sourcesContent":["import { classNames } from '@dimjs/utils';\nimport { isHttpUri } from '@flatbiz/utils';\nimport { CSSProperties } from 'react';\nimport './style.less';\nexport type SvgHttpViewProps = {\n /**\n * svg地址\n * ```\n * 1. 可传http绝对路径\n * 2. 可传ionic组图标,例如:ionic/alarm-outline\n * 3. 可传lucide组图标,例如:lucide/crosshair\n *\n * 查询ionic、lucide图标 https://fex.qa.tcshuke.com/docs/admin/resources/icons\n * ```\n */\n svgPath: string;\n /** 默认:100% */\n width?: number;\n /** 默认:100% */\n height?: number;\n /** svg 颜色, 默认:#555 */\n color?: string;\n className?: string;\n style?: CSSProperties;\n};\n\n/**\n * http svg地址解析,可自定义颜色\n * ```\n * 1. 内置ionic、lucide组图标基础路径\n * 2. 可传自定义http绝对路径svg数据\n * ```\n */\nexport const SvgHttpView = (props: SvgHttpViewProps) => {\n const color = props.color || '#555';\n\n const srcLink = isHttpUri(props.svgPath)\n ? props.svgPath\n : `https://file.40017.cn/tcsk/alicon/${props.svgPath}.svg`;\n\n return (\n <div\n className={classNames('http-svg-view', props.className)}\n style={{ width: props.width || '100%', height: props.height || '100%', ...props.style }}\n >\n <div className=\"hsv-content\" style={{ filter: `drop-shadow(${color} 200px 0)` }}>\n <img src={srcLink} />\n </div>\n </div>\n );\n};\n"],"names":["SvgHttpView","props","color","srcLink","isHttpUri","svgPath","_jsx","className","_classNames","style","_extends","width","height","children","filter","src"],"mappings":";8MAiCaA,EAAc,SAAdA,EAAeC,GAC1B,IAAMC,EAAQD,EAAMC,OAAS,OAE7B,IAAMC,EAAUC,EAAUH,EAAMI,SAC5BJ,EAAMI,QAAO,qCACwBJ,EAAMI,QAAa,OAE5D,OACEC,EAAA,MAAA,CACEC,UAAWC,EAAW,gBAAiBP,EAAMM,WAC7CE,MAAKC,EAAA,CAAIC,MAAOV,EAAMU,OAAS,OAAQC,OAAQX,EAAMW,QAAU,QAAWX,EAAMQ,OAAQI,SAExFP,EAAA,MAAA,CAAKC,UAAU,cAAcE,MAAO,CAAEK,sBAAuBZ,EAAK,aAAcW,SAC9EP,EAAA,MAAA,CAAKS,IAAKZ,OAIlB"}
package/index.d.ts CHANGED
@@ -3209,6 +3209,35 @@ export type SplitWrapperProps = SplitProps & {
3209
3209
  */
3210
3210
  export declare const SplitWrapper: (props: SplitWrapperProps) => import("react/jsx-runtime").JSX.Element;
3211
3211
  export declare const styles: () => void;
3212
+ export type SvgHttpViewProps = {
3213
+ /**
3214
+ * svg地址
3215
+ * ```
3216
+ * 1. 可传http绝对路径
3217
+ * 2. 可传ionic组图标,例如:ionic/alarm-outline
3218
+ * 3. 可传lucide组图标,例如:lucide/crosshair
3219
+ *
3220
+ * 查询ionic、lucide图标 https://fex.qa.tcshuke.com/docs/admin/resources/icons
3221
+ * ```
3222
+ */
3223
+ svgPath: string;
3224
+ /** 默认:100% */
3225
+ width?: number;
3226
+ /** 默认:100% */
3227
+ height?: number;
3228
+ /** svg 颜色, 默认:#555 */
3229
+ color?: string;
3230
+ className?: string;
3231
+ style?: CSSProperties;
3232
+ };
3233
+ /**
3234
+ * http svg地址解析,可自定义颜色
3235
+ * ```
3236
+ * 1. 内置ionic、lucide组图标基础路径
3237
+ * 2. 可传自定义http绝对路径svg数据
3238
+ * ```
3239
+ */
3240
+ export declare const SvgHttpView: (props: SvgHttpViewProps) => import("react/jsx-runtime").JSX.Element;
3212
3241
  export type SwitchConfirmWrapperValue = string | number | boolean;
3213
3242
  export type SwitchConfirmWrapperProps = Omit<SwitchProps, "defaultChecked" | "onChange"> & {
3214
3243
  value?: SwitchConfirmWrapperValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "4.2.106",
3
+ "version": "4.3.0",
4
4
  "description": "flat-biz ui components",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -33,7 +33,7 @@
33
33
  "@dimjs/utils": ">=1.4.4",
34
34
  "@flatbiz/utils": ">=4.0.19",
35
35
  "@wove/react": ">=1.2.23",
36
- "antd": ">=5.5.1",
36
+ "antd": ">=5.11.0",
37
37
  "dayjs": ">=1.11.9",
38
38
  "react": ">=18.2.0",
39
39
  "react-dom": ">=18.2.0",
@@ -47,7 +47,7 @@
47
47
  "@dimjs/utils": "^1.4.4",
48
48
  "@flatbiz/utils": "^4.0.16",
49
49
  "@wove/react": "^1.2.23",
50
- "antd": "5.5.1",
50
+ "antd": "5.11.0",
51
51
  "dayjs": "1.11.9",
52
52
  "dequal": "2.0.3",
53
53
  "react": "18.2.0",