deepsea-components 5.4.2 → 5.5.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.
- package/dist/cjs/components/FormLabel.d.ts +15 -0
- package/dist/cjs/components/FormLabel.js +49 -0
- package/dist/cjs/components/FormLabel.js.map +7 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/components/FormLabel.d.ts +15 -0
- package/dist/esm/components/FormLabel.js +34 -0
- package/dist/esm/components/FormLabel.js.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FormLabel.tsx +38 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentProps, FC } from "react";
|
|
2
|
+
export type FormLabelProps = ComponentProps<"div"> & {
|
|
3
|
+
/**
|
|
4
|
+
* Label 的宽度.
|
|
5
|
+
*/
|
|
6
|
+
width: number;
|
|
7
|
+
/**
|
|
8
|
+
* 是否在 Label 前面添加一个空白区域,只有当前 Label 为非必选,而存在其他 Label 为必选的时候开启
|
|
9
|
+
*/
|
|
10
|
+
before?: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 为 Ant Design 的 FormItem 设计的 Label 组件
|
|
14
|
+
*/
|
|
15
|
+
export declare const FormLabel: FC<FormLabelProps>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/FormLabel.tsx
|
|
20
|
+
var FormLabel_exports = {};
|
|
21
|
+
__export(FormLabel_exports, {
|
|
22
|
+
FormLabel: () => FormLabel
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(FormLabel_exports);
|
|
25
|
+
var import_css = require("@emotion/css");
|
|
26
|
+
var import_deepsea_tools = require("deepsea-tools");
|
|
27
|
+
var import_react = require("react");
|
|
28
|
+
var FormLabel = (props) => {
|
|
29
|
+
const { className, style, before, width, ...rest } = props;
|
|
30
|
+
return /* @__PURE__ */ React.createElement(import_react.Fragment, null, !!before && /* @__PURE__ */ React.createElement("div", { className: "w-[11px]" }, " "), /* @__PURE__ */ React.createElement(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
className: (0, import_deepsea_tools.clsx)(
|
|
34
|
+
import_css.css`
|
|
35
|
+
text-align: justify;
|
|
36
|
+
text-align-last: justify;
|
|
37
|
+
`,
|
|
38
|
+
className
|
|
39
|
+
),
|
|
40
|
+
style: { width, ...style },
|
|
41
|
+
...rest
|
|
42
|
+
}
|
|
43
|
+
));
|
|
44
|
+
};
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
FormLabel
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=FormLabel.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/FormLabel.tsx"],
|
|
4
|
+
"sourcesContent": ["import { css } from \"@emotion/css\"\r\nimport { clsx } from \"deepsea-tools\"\r\nimport { ComponentProps, FC, Fragment } from \"react\"\r\n\r\nexport type FormLabelProps = ComponentProps<\"div\"> & {\r\n /**\r\n * Label 的宽度.\r\n */\r\n width: number\r\n /**\r\n * 是否在 Label 前面添加一个空白区域,只有当前 Label 为非必选,而存在其他 Label 为必选的时候开启\r\n */\r\n before?: boolean\r\n}\r\n\r\n/**\r\n * 为 Ant Design 的 FormItem 设计的 Label 组件\r\n */\r\nexport const FormLabel: FC<FormLabelProps> = props => {\r\n const { className, style, before, width, ...rest } = props\r\n\r\n return (\r\n <Fragment>\r\n {!!before && <div className=\"w-[11px]\"> </div>}\r\n <div\r\n className={clsx(\r\n css`\r\n text-align: justify;\r\n text-align-last: justify;\r\n `,\r\n className\r\n )}\r\n style={{ width, ...style }}\r\n {...rest}\r\n />\r\n </Fragment>\r\n )\r\n}\r\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAoB;AACpB,2BAAqB;AACrB,mBAA6C;AAgBtC,IAAM,YAAgC,WAAS;AAClD,QAAM,EAAE,WAAW,OAAO,QAAQ,OAAO,GAAG,KAAK,IAAI;AAErD,SACI,oCAAC,6BACI,CAAC,CAAC,UAAU,oCAAC,SAAI,WAAU,cAAW,GAAM,GAC7C;AAAA,IAAC;AAAA;AAAA,MACG,eAAW;AAAA,QACP;AAAA;AAAA;AAAA;AAAA,QAIA;AAAA,MACJ;AAAA,MACA,OAAO,EAAE,OAAO,GAAG,MAAM;AAAA,MACxB,GAAG;AAAA;AAAA,EACR,CACJ;AAER;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from "./components/AutoSizeTextarea";
|
|
|
4
4
|
export * from "./components/CircleText";
|
|
5
5
|
export * from "./components/Echart";
|
|
6
6
|
export * from "./components/Flow";
|
|
7
|
+
export * from "./components/FormLabel";
|
|
7
8
|
export * from "./components/HlsPlayer";
|
|
8
9
|
export * from "./components/InfiniteScroll";
|
|
9
10
|
export * from "./components/InputFile";
|
package/dist/cjs/index.js
CHANGED
|
@@ -22,6 +22,7 @@ __reExport(src_exports, require("./components/AutoSizeTextarea"), module.exports
|
|
|
22
22
|
__reExport(src_exports, require("./components/CircleText"), module.exports);
|
|
23
23
|
__reExport(src_exports, require("./components/Echart"), module.exports);
|
|
24
24
|
__reExport(src_exports, require("./components/Flow"), module.exports);
|
|
25
|
+
__reExport(src_exports, require("./components/FormLabel"), module.exports);
|
|
25
26
|
__reExport(src_exports, require("./components/HlsPlayer"), module.exports);
|
|
26
27
|
__reExport(src_exports, require("./components/InfiniteScroll"), module.exports);
|
|
27
28
|
__reExport(src_exports, require("./components/InputFile"), module.exports);
|
|
@@ -44,6 +45,7 @@ __reExport(src_exports, require("./utils/index"), module.exports);
|
|
|
44
45
|
...require("./components/CircleText"),
|
|
45
46
|
...require("./components/Echart"),
|
|
46
47
|
...require("./components/Flow"),
|
|
48
|
+
...require("./components/FormLabel"),
|
|
47
49
|
...require("./components/HlsPlayer"),
|
|
48
50
|
...require("./components/InfiniteScroll"),
|
|
49
51
|
...require("./components/InputFile"),
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from \"@components/AutoFit\"\nexport * from \"@components/AutoScroll\"\nexport * from \"@components/AutoSizeTextarea\"\nexport * from \"@components/CircleText\"\nexport * from \"@components/Echart\"\nexport * from \"@components/Flow\"\nexport * from \"@components/HlsPlayer\"\nexport * from \"@components/InfiniteScroll\"\nexport * from \"@components/InputFile\"\nexport * from \"@components/LoopSwiper\"\nexport * from \"@components/Ring\"\nexport * from \"@components/Scroll\"\nexport * from \"@components/SectionRing\"\nexport * from \"@components/Skeleton\"\nexport * from \"@components/Title\"\nexport * from \"@components/TransitionBox\"\nexport * from \"@components/TransitionNum\"\nexport * from \"@components/Trapezium\"\nexport * from \"@utils/getReactVersion\"\nexport * from \"@utils/index\"\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,iCAAd;AACA,wBAAc,oCADd;AAEA,wBAAc,0CAFd;AAGA,wBAAc,oCAHd;AAIA,wBAAc,gCAJd;AAKA,wBAAc,8BALd;AAMA,wBAAc,mCANd;AAOA,wBAAc,
|
|
4
|
+
"sourcesContent": ["export * from \"@components/AutoFit\"\nexport * from \"@components/AutoScroll\"\nexport * from \"@components/AutoSizeTextarea\"\nexport * from \"@components/CircleText\"\nexport * from \"@components/Echart\"\nexport * from \"@components/Flow\"\nexport * from \"@components/FormLabel\"\nexport * from \"@components/HlsPlayer\"\nexport * from \"@components/InfiniteScroll\"\nexport * from \"@components/InputFile\"\nexport * from \"@components/LoopSwiper\"\nexport * from \"@components/Ring\"\nexport * from \"@components/Scroll\"\nexport * from \"@components/SectionRing\"\nexport * from \"@components/Skeleton\"\nexport * from \"@components/Title\"\nexport * from \"@components/TransitionBox\"\nexport * from \"@components/TransitionNum\"\nexport * from \"@components/Trapezium\"\nexport * from \"@utils/getReactVersion\"\nexport * from \"@utils/index\"\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,iCAAd;AACA,wBAAc,oCADd;AAEA,wBAAc,0CAFd;AAGA,wBAAc,oCAHd;AAIA,wBAAc,gCAJd;AAKA,wBAAc,8BALd;AAMA,wBAAc,mCANd;AAOA,wBAAc,mCAPd;AAQA,wBAAc,wCARd;AASA,wBAAc,mCATd;AAUA,wBAAc,oCAVd;AAWA,wBAAc,8BAXd;AAYA,wBAAc,gCAZd;AAaA,wBAAc,qCAbd;AAcA,wBAAc,kCAdd;AAeA,wBAAc,+BAfd;AAgBA,wBAAc,uCAhBd;AAiBA,wBAAc,uCAjBd;AAkBA,wBAAc,mCAlBd;AAmBA,wBAAc,oCAnBd;AAoBA,wBAAc,0BApBd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentProps, FC } from "react";
|
|
2
|
+
export type FormLabelProps = ComponentProps<"div"> & {
|
|
3
|
+
/**
|
|
4
|
+
* Label 的宽度.
|
|
5
|
+
*/
|
|
6
|
+
width: number;
|
|
7
|
+
/**
|
|
8
|
+
* 是否在 Label 前面添加一个空白区域,只有当前 Label 为非必选,而存在其他 Label 为必选的时候开启
|
|
9
|
+
*/
|
|
10
|
+
before?: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 为 Ant Design 的 FormItem 设计的 Label 组件
|
|
14
|
+
*/
|
|
15
|
+
export declare const FormLabel: FC<FormLabelProps>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { css } from "@emotion/css";
|
|
2
|
+
import { clsx } from "deepsea-tools";
|
|
3
|
+
import { Fragment } from "react";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
/**
|
|
7
|
+
* 为 Ant Design 的 FormItem 设计的 Label 组件
|
|
8
|
+
*/
|
|
9
|
+
export const FormLabel = props => {
|
|
10
|
+
const {
|
|
11
|
+
className,
|
|
12
|
+
style,
|
|
13
|
+
before,
|
|
14
|
+
width,
|
|
15
|
+
...rest
|
|
16
|
+
} = props;
|
|
17
|
+
return /*#__PURE__*/_jsxs(Fragment, {
|
|
18
|
+
children: [!!before && /*#__PURE__*/_jsx("div", {
|
|
19
|
+
className: "w-[11px]",
|
|
20
|
+
children: "\u2002"
|
|
21
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
22
|
+
className: clsx(css`
|
|
23
|
+
text-align: justify;
|
|
24
|
+
text-align-last: justify;
|
|
25
|
+
`, className),
|
|
26
|
+
style: {
|
|
27
|
+
width,
|
|
28
|
+
...style
|
|
29
|
+
},
|
|
30
|
+
...rest
|
|
31
|
+
})]
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=FormLabel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["css","clsx","Fragment","jsx","_jsx","jsxs","_jsxs","FormLabel","props","className","style","before","width","rest","children"],"sources":["../../../src/components/FormLabel.tsx"],"sourcesContent":["import { css } from \"@emotion/css\"\r\nimport { clsx } from \"deepsea-tools\"\r\nimport { ComponentProps, FC, Fragment } from \"react\"\r\n\r\nexport type FormLabelProps = ComponentProps<\"div\"> & {\r\n /**\r\n * Label 的宽度.\r\n */\r\n width: number\r\n /**\r\n * 是否在 Label 前面添加一个空白区域,只有当前 Label 为非必选,而存在其他 Label 为必选的时候开启\r\n */\r\n before?: boolean\r\n}\r\n\r\n/**\r\n * 为 Ant Design 的 FormItem 设计的 Label 组件\r\n */\r\nexport const FormLabel: FC<FormLabelProps> = props => {\r\n const { className, style, before, width, ...rest } = props\r\n\r\n return (\r\n <Fragment>\r\n {!!before && <div className=\"w-[11px]\"> </div>}\r\n <div\r\n className={clsx(\r\n css`\r\n text-align: justify;\r\n text-align-last: justify;\r\n `,\r\n className\r\n )}\r\n style={{ width, ...style }}\r\n {...rest}\r\n />\r\n </Fragment>\r\n )\r\n}\r\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,cAAc;AAClC,SAASC,IAAI,QAAQ,eAAe;AACpC,SAA6BC,QAAQ,QAAQ,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAapD;AACA;AACA;AACA,OAAO,MAAMC,SAA6B,GAAGC,KAAK,IAAI;EAClD,MAAM;IAAEC,SAAS;IAAEC,KAAK;IAAEC,MAAM;IAAEC,KAAK;IAAE,GAAGC;EAAK,CAAC,GAAGL,KAAK;EAE1D,oBACIF,KAAA,CAACJ,QAAQ;IAAAY,QAAA,GACJ,CAAC,CAACH,MAAM,iBAAIP,IAAA;MAAKK,SAAS,EAAC,UAAU;MAAAK,QAAA,EAAC;IAAM,CAAK,CAAC,eACnDV,IAAA;MACIK,SAAS,EAAER,IAAI,CACXD,GAAI;AACxB;AACA;AACA,qBAAqB,EACDS,SACJ,CAAE;MACFC,KAAK,EAAE;QAAEE,KAAK;QAAE,GAAGF;MAAM,CAAE;MAAA,GACvBG;IAAI,CACX,CAAC;EAAA,CACI,CAAC;AAEnB,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from "./components/AutoSizeTextarea";
|
|
|
4
4
|
export * from "./components/CircleText";
|
|
5
5
|
export * from "./components/Echart";
|
|
6
6
|
export * from "./components/Flow";
|
|
7
|
+
export * from "./components/FormLabel";
|
|
7
8
|
export * from "./components/HlsPlayer";
|
|
8
9
|
export * from "./components/InfiniteScroll";
|
|
9
10
|
export * from "./components/InputFile";
|
package/dist/esm/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export * from "./components/AutoSizeTextarea";
|
|
|
4
4
|
export * from "./components/CircleText";
|
|
5
5
|
export * from "./components/Echart";
|
|
6
6
|
export * from "./components/Flow";
|
|
7
|
+
export * from "./components/FormLabel";
|
|
7
8
|
export * from "./components/HlsPlayer";
|
|
8
9
|
export * from "./components/InfiniteScroll";
|
|
9
10
|
export * from "./components/InputFile";
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from \"@components/AutoFit\"\nexport * from \"@components/AutoScroll\"\nexport * from \"@components/AutoSizeTextarea\"\nexport * from \"@components/CircleText\"\nexport * from \"@components/Echart\"\nexport * from \"@components/Flow\"\nexport * from \"@components/HlsPlayer\"\nexport * from \"@components/InfiniteScroll\"\nexport * from \"@components/InputFile\"\nexport * from \"@components/LoopSwiper\"\nexport * from \"@components/Ring\"\nexport * from \"@components/Scroll\"\nexport * from \"@components/SectionRing\"\nexport * from \"@components/Skeleton\"\nexport * from \"@components/Title\"\nexport * from \"@components/TransitionBox\"\nexport * from \"@components/TransitionNum\"\nexport * from \"@components/Trapezium\"\nexport * from \"@utils/getReactVersion\"\nexport * from \"@utils/index\"\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from \"@components/AutoFit\"\nexport * from \"@components/AutoScroll\"\nexport * from \"@components/AutoSizeTextarea\"\nexport * from \"@components/CircleText\"\nexport * from \"@components/Echart\"\nexport * from \"@components/Flow\"\nexport * from \"@components/FormLabel\"\nexport * from \"@components/HlsPlayer\"\nexport * from \"@components/InfiniteScroll\"\nexport * from \"@components/InputFile\"\nexport * from \"@components/LoopSwiper\"\nexport * from \"@components/Ring\"\nexport * from \"@components/Scroll\"\nexport * from \"@components/SectionRing\"\nexport * from \"@components/Skeleton\"\nexport * from \"@components/Title\"\nexport * from \"@components/TransitionBox\"\nexport * from \"@components/TransitionNum\"\nexport * from \"@components/Trapezium\"\nexport * from \"@utils/getReactVersion\"\nexport * from \"@utils/index\"\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { css } from "@emotion/css"
|
|
2
|
+
import { clsx } from "deepsea-tools"
|
|
3
|
+
import { ComponentProps, FC, Fragment } from "react"
|
|
4
|
+
|
|
5
|
+
export type FormLabelProps = ComponentProps<"div"> & {
|
|
6
|
+
/**
|
|
7
|
+
* Label 的宽度.
|
|
8
|
+
*/
|
|
9
|
+
width: number
|
|
10
|
+
/**
|
|
11
|
+
* 是否在 Label 前面添加一个空白区域,只有当前 Label 为非必选,而存在其他 Label 为必选的时候开启
|
|
12
|
+
*/
|
|
13
|
+
before?: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 为 Ant Design 的 FormItem 设计的 Label 组件
|
|
18
|
+
*/
|
|
19
|
+
export const FormLabel: FC<FormLabelProps> = props => {
|
|
20
|
+
const { className, style, before, width, ...rest } = props
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<Fragment>
|
|
24
|
+
{!!before && <div className="w-[11px]"> </div>}
|
|
25
|
+
<div
|
|
26
|
+
className={clsx(
|
|
27
|
+
css`
|
|
28
|
+
text-align: justify;
|
|
29
|
+
text-align-last: justify;
|
|
30
|
+
`,
|
|
31
|
+
className
|
|
32
|
+
)}
|
|
33
|
+
style={{ width, ...style }}
|
|
34
|
+
{...rest}
|
|
35
|
+
/>
|
|
36
|
+
</Fragment>
|
|
37
|
+
)
|
|
38
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from "@components/AutoSizeTextarea"
|
|
|
4
4
|
export * from "@components/CircleText"
|
|
5
5
|
export * from "@components/Echart"
|
|
6
6
|
export * from "@components/Flow"
|
|
7
|
+
export * from "@components/FormLabel"
|
|
7
8
|
export * from "@components/HlsPlayer"
|
|
8
9
|
export * from "@components/InfiniteScroll"
|
|
9
10
|
export * from "@components/InputFile"
|