@cuvp1225/antd 0.1.19-beta.35 → 0.1.19-beta.37

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.
@@ -53,4 +53,4 @@ export { Tree } from './tree';
53
53
  export { Alert } from "./alert";
54
54
  export { Progress } from './progress';
55
55
  export { BackTop } from './backTop';
56
- export { UniTabs } from './uniTabs/unitabs';
56
+ export { Steps } from './steps';
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TreeSelect = exports.Mentions = exports.AutoComplete = exports.Switch = exports.PageHeader = exports.Statistic = exports.Transfer = exports.TimePicker = exports.Comment = exports.Rate = exports.Slider = exports.Empty = exports.Avatar = exports.Card = exports.Table = exports.Pagination = exports.Badge = exports.Divider = exports.Carousel = exports.Calendar = exports.Anchor = exports.Spin = exports.Skeleton = exports.Upload = exports.Dropdown = exports.Collapse = exports.Menu = exports.Breadcrumb = exports.Cascader = exports.CheckboxGroup = exports.Checkbox = exports.RadioGroup = exports.Radio = exports.DatePicker = exports.Drawer = exports.Result = exports.Tooltip = exports.Popover = exports.Popconfirm = exports.Space = exports.Select = exports.Password = exports.TextArea = exports.Input = exports.InputNumber = exports.ButtonGroup = exports.Button = exports.Box = exports.When = exports.Each = void 0;
4
- exports.UniTabs = exports.BackTop = exports.Progress = exports.Alert = exports.Tree = exports.Descriptions = exports.Image = void 0;
4
+ exports.Steps = exports.BackTop = exports.Progress = exports.Alert = exports.Tree = exports.Descriptions = exports.Image = void 0;
5
5
  const tslib_1 = require("tslib");
6
6
  tslib_1.__exportStar(require("antd"), exports);
7
7
  //以下组件都从antd中导出,解决下述组件卡顿问题
@@ -141,5 +141,7 @@ Object.defineProperty(exports, "BackTop", { enumerable: true, get: function () {
141
141
  //export {Affix} from './affix';
142
142
  //import * as echarts from 'echarts';
143
143
  //export {LineChart} from './LineChart';
144
- var unitabs_1 = require("./uniTabs/unitabs");
145
- Object.defineProperty(exports, "UniTabs", { enumerable: true, get: function () { return unitabs_1.UniTabs; } });
144
+ // export { UniTabs } from './uniTabs/unitabs'
145
+ // export {UniButton, UniButtonGroup} from './uniButton/unibutton'
146
+ var steps_1 = require("./steps");
147
+ Object.defineProperty(exports, "Steps", { enumerable: true, get: function () { return steps_1.Steps; } });
@@ -0,0 +1,11 @@
1
+ import { StepProps, StepsProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Steps: ({ [SLOT.dnd]: dataDnd, [SLOT.id]: dataId, style, ...rest }: StepsProps & {
4
+ [key: string]: any;
5
+ dnd?: string;
6
+ children?: React.ReactNode;
7
+ }) => React.JSX.Element;
8
+ export declare const StepsStep: (props: StepProps & {
9
+ [key: string]: any;
10
+ children?: React.ReactNode;
11
+ }) => React.JSX.Element;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StepsStep = exports.Steps = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const antd_1 = require("antd");
6
+ const react_1 = tslib_1.__importDefault(require("react"));
7
+ const slottype_1 = require("../helpers/slottype");
8
+ const Steps = (_a) => {
9
+ var _b = slottype_1.SLOT.dnd, dataDnd = _a[_b], _c = slottype_1.SLOT.id, dataId = _a[_c], { style } = _a, rest = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
10
+ return (react_1.default.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
11
+ react_1.default.createElement(antd_1.Steps, Object.assign({}, rest), rest.children)));
12
+ };
13
+ exports.Steps = Steps;
14
+ const StepsStep = (props) => {
15
+ return (react_1.default.createElement(antd_1.Steps.Step, Object.assign({}, props)));
16
+ };
17
+ exports.StepsStep = StepsStep;
@@ -0,0 +1,8 @@
1
+ import { ButtonProps } from "antd";
2
+ import React from "react";
3
+ export declare const UniButton: ({ [SLOT.dnd]: dataDnd, [SLOT.id]: dataId, style, theme, ...rest }: ButtonProps & {
4
+ [key: string]: any;
5
+ dnd?: string;
6
+ children?: React.ReactNode;
7
+ }) => React.JSX.Element;
8
+ export declare const UniButtonGroup: React.FC<import("antd/lib/button").ButtonGroupProps>;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UniButtonGroup = exports.UniButton = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const antd_1 = require("antd");
6
+ const slottype_1 = require("../../helpers/slottype");
7
+ const react_1 = tslib_1.__importStar(require("react"));
8
+ const UniButton = (_a) => {
9
+ var _b = slottype_1.SLOT.dnd, dataDnd = _a[_b], _c = slottype_1.SLOT.id, dataId = _a[_c], { style, theme } = _a, rest = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style", "theme"]);
10
+ const redCss = `
11
+ .uni-${rest.tid} {
12
+ color: #fff;
13
+ border-color: #B30000 !important;
14
+ background: #B30000 !important;
15
+
16
+ }
17
+
18
+ .uni-${rest.tid}:hover,
19
+ .uni-${rest.tid}:focus {
20
+ color: #fff;
21
+ border-color: #B30000 !important;
22
+ background: #B30000 !important;
23
+ }
24
+ `;
25
+ const blueCss = `
26
+ .uni-${rest.tid} {
27
+ color: #fff;
28
+ border-color: #1890ff !important;
29
+ background: #1890ff !important;
30
+
31
+ }
32
+
33
+ .uni-${rest.tid}:hover,
34
+ .uni-${rest.tid}:focus {
35
+ color: #fff;
36
+ border-color: #1890ff !important;
37
+ background: #1890ff !important;
38
+ }`;
39
+ const greenCss = `
40
+ .uni-${rest.tid} {
41
+ color: #fff;
42
+ border-color: #17c60e !important;
43
+ background: #17c60e !important;
44
+
45
+ }
46
+
47
+ .uni-${rest.tid}:hover,
48
+ .uni-${rest.tid}:focus {
49
+ color: #fff;
50
+ border-color: #17c60e !important;
51
+ background: #17c60e !important;
52
+ }`;
53
+ (0, react_1.useEffect)(() => {
54
+ const allow = ['blue', 'green', 'red'];
55
+ if (allow.includes(theme)) {
56
+ const css = theme === 'blue' ? blueCss : theme === 'green' ? greenCss : redCss;
57
+ const style = document.createElement('style');
58
+ style.innerHTML = css;
59
+ document.head.appendChild(style);
60
+ }
61
+ }, [theme]);
62
+ return (react_1.default.createElement(antd_1.Button, Object.assign({ className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}`, "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style }, rest)));
63
+ };
64
+ exports.UniButton = UniButton;
65
+ exports.UniButtonGroup = antd_1.Button.Group;
@@ -0,0 +1,14 @@
1
+ import { ModalProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const UniModal: {
4
+ ({ [SLOT.dnd]: dataDnd, [SLOT.id]: dataId, children, style, theme, ...rest }: ModalProps & {
5
+ [key: string]: any;
6
+ dnd?: string;
7
+ children?: React.ReactNode;
8
+ }): React.JSX.Element;
9
+ info: import("antd/lib/modal/confirm").ModalFunc;
10
+ success: import("antd/lib/modal/confirm").ModalFunc;
11
+ error: import("antd/lib/modal/confirm").ModalFunc;
12
+ warning: import("antd/lib/modal/confirm").ModalFunc;
13
+ confirm: import("antd/lib/modal/confirm").ModalFunc;
14
+ };
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UniModal = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const antd_1 = require("antd");
6
+ const react_1 = tslib_1.__importStar(require("react"));
7
+ const slottype_1 = require("../../helpers/slottype");
8
+ const UniModal = (_a) => {
9
+ var _b = slottype_1.SLOT.dnd, dataDnd = _a[_b], _c = slottype_1.SLOT.id, dataId = _a[_c], { children, style, theme } = _a, rest = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "children", "style", "theme"]);
10
+ // 主题样式定义
11
+ const redCss = `
12
+ // .uni-${rest.tid} .ant-modal-header {
13
+ // background: #ffeded;
14
+ // border-bottom: 2px solid #B20000;
15
+ // }
16
+ // .uni-${rest.tid} .ant-modal-title {
17
+ // color: #B20000 !important;
18
+ // }
19
+ .uni-${rest.tid} .ant-modal-footer .ant-btn-primary {
20
+ background: #B20000;
21
+ border-color: #B20000;
22
+ }
23
+ `;
24
+ const blueCss = `
25
+ // .uni-${rest.tid} .ant-modal-header {
26
+ // background: #e6f7ff;
27
+ // border-bottom: 2px solid #1890ff;
28
+ // }
29
+ // .uni-${rest.tid} .ant-modal-title {
30
+ // color: #1890ff !important;
31
+ // }
32
+ .uni-${rest.tid} .ant-modal-footer .ant-btn-primary {
33
+ background: #1890ff;
34
+ border-color: #1890ff;
35
+ }
36
+ `;
37
+ const greenCss = `
38
+ // .uni-${rest.tid} .ant-modal-header {
39
+ // background: #f6ffed;
40
+ // border-bottom: 2px solid #17c60e;
41
+ // }
42
+ // .uni-${rest.tid} .ant-modal-title {
43
+ // color: #17c60e !important;
44
+ // }
45
+ .uni-${rest.tid} .ant-modal-footer .ant-btn-primary {
46
+ background: #17c60e;
47
+ border-color: #17c60e;
48
+ }
49
+ `;
50
+ (0, react_1.useEffect)(() => {
51
+ const allow = ['blue', 'green', 'red'];
52
+ if (allow.includes(theme)) {
53
+ const css = theme === 'blue' ? blueCss : theme === 'green' ? greenCss : redCss;
54
+ const style = document.createElement('style');
55
+ style.innerHTML = css;
56
+ document.head.appendChild(style);
57
+ }
58
+ }, [theme]);
59
+ return (react_1.default.createElement(antd_1.Modal, Object.assign({ className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}`, "data-dnd": dataDnd, "data-id": rest.tid, style: style }, rest), children));
60
+ };
61
+ exports.UniModal = UniModal;
62
+ // 导出静态方法以支持 Modal.info() 等调用方式
63
+ exports.UniModal.info = antd_1.Modal.info;
64
+ exports.UniModal.success = antd_1.Modal.success;
65
+ exports.UniModal.error = antd_1.Modal.error;
66
+ exports.UniModal.warning = antd_1.Modal.warning;
67
+ exports.UniModal.confirm = antd_1.Modal.confirm;
@@ -1,2 +1 @@
1
- import 'antd/dist/antd.css';
2
1
  export * from './components';
package/lib/cjs/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- require("antd/dist/antd.css");
4
+ //import 'antd/dist/antd.css';
5
5
  tslib_1.__exportStar(require("./components"), exports);
@@ -53,4 +53,4 @@ export { Tree } from './tree';
53
53
  export { Alert } from "./alert";
54
54
  export { Progress } from './progress';
55
55
  export { BackTop } from './backTop';
56
- export { UniTabs } from './uniTabs/unitabs';
56
+ export { Steps } from './steps';
@@ -80,4 +80,6 @@ export { BackTop } from './backTop';
80
80
  //export {Affix} from './affix';
81
81
  //import * as echarts from 'echarts';
82
82
  //export {LineChart} from './LineChart';
83
- export { UniTabs } from './uniTabs/unitabs';
83
+ // export { UniTabs } from './uniTabs/unitabs'
84
+ // export {UniButton, UniButtonGroup} from './uniButton/unibutton'
85
+ export { Steps } from './steps';
@@ -0,0 +1,11 @@
1
+ import { StepProps, StepsProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Steps: ({ [SLOT.dnd]: dataDnd, [SLOT.id]: dataId, style, ...rest }: StepsProps & {
4
+ [key: string]: any;
5
+ dnd?: string;
6
+ children?: React.ReactNode;
7
+ }) => React.JSX.Element;
8
+ export declare const StepsStep: (props: StepProps & {
9
+ [key: string]: any;
10
+ children?: React.ReactNode;
11
+ }) => React.JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { __rest } from "tslib";
2
+ import { Steps as AntdSteps } from 'antd';
3
+ import React from 'react';
4
+ import { SLOT } from '../helpers/slottype';
5
+ export const Steps = (_a) => {
6
+ var _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
7
+ return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
8
+ React.createElement(AntdSteps, Object.assign({}, rest), rest.children)));
9
+ };
10
+ export const StepsStep = (props) => {
11
+ return (React.createElement(AntdSteps.Step, Object.assign({}, props)));
12
+ };
@@ -0,0 +1,8 @@
1
+ import { ButtonProps } from "antd";
2
+ import React from "react";
3
+ export declare const UniButton: ({ [SLOT.dnd]: dataDnd, [SLOT.id]: dataId, style, theme, ...rest }: ButtonProps & {
4
+ [key: string]: any;
5
+ dnd?: string;
6
+ children?: React.ReactNode;
7
+ }) => React.JSX.Element;
8
+ export declare const UniButtonGroup: React.FC<import("antd/lib/button").ButtonGroupProps>;
@@ -0,0 +1,61 @@
1
+ import { __rest } from "tslib";
2
+ import { Button as AntButton } from "antd";
3
+ import { SLOT } from "../../helpers/slottype";
4
+ import React, { useEffect } from "react";
5
+ export const UniButton = (_a) => {
6
+ var _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style, theme } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style", "theme"]);
7
+ const redCss = `
8
+ .uni-${rest.tid} {
9
+ color: #fff;
10
+ border-color: #B30000 !important;
11
+ background: #B30000 !important;
12
+
13
+ }
14
+
15
+ .uni-${rest.tid}:hover,
16
+ .uni-${rest.tid}:focus {
17
+ color: #fff;
18
+ border-color: #B30000 !important;
19
+ background: #B30000 !important;
20
+ }
21
+ `;
22
+ const blueCss = `
23
+ .uni-${rest.tid} {
24
+ color: #fff;
25
+ border-color: #1890ff !important;
26
+ background: #1890ff !important;
27
+
28
+ }
29
+
30
+ .uni-${rest.tid}:hover,
31
+ .uni-${rest.tid}:focus {
32
+ color: #fff;
33
+ border-color: #1890ff !important;
34
+ background: #1890ff !important;
35
+ }`;
36
+ const greenCss = `
37
+ .uni-${rest.tid} {
38
+ color: #fff;
39
+ border-color: #17c60e !important;
40
+ background: #17c60e !important;
41
+
42
+ }
43
+
44
+ .uni-${rest.tid}:hover,
45
+ .uni-${rest.tid}:focus {
46
+ color: #fff;
47
+ border-color: #17c60e !important;
48
+ background: #17c60e !important;
49
+ }`;
50
+ useEffect(() => {
51
+ const allow = ['blue', 'green', 'red'];
52
+ if (allow.includes(theme)) {
53
+ const css = theme === 'blue' ? blueCss : theme === 'green' ? greenCss : redCss;
54
+ const style = document.createElement('style');
55
+ style.innerHTML = css;
56
+ document.head.appendChild(style);
57
+ }
58
+ }, [theme]);
59
+ return (React.createElement(AntButton, Object.assign({ className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}`, "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style }, rest)));
60
+ };
61
+ export const UniButtonGroup = AntButton.Group;
@@ -0,0 +1,14 @@
1
+ import { ModalProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const UniModal: {
4
+ ({ [SLOT.dnd]: dataDnd, [SLOT.id]: dataId, children, style, theme, ...rest }: ModalProps & {
5
+ [key: string]: any;
6
+ dnd?: string;
7
+ children?: React.ReactNode;
8
+ }): React.JSX.Element;
9
+ info: import("antd/lib/modal/confirm").ModalFunc;
10
+ success: import("antd/lib/modal/confirm").ModalFunc;
11
+ error: import("antd/lib/modal/confirm").ModalFunc;
12
+ warning: import("antd/lib/modal/confirm").ModalFunc;
13
+ confirm: import("antd/lib/modal/confirm").ModalFunc;
14
+ };
@@ -0,0 +1,63 @@
1
+ import { __rest } from "tslib";
2
+ import { Modal as AntModal } from 'antd';
3
+ import React, { useEffect } from 'react';
4
+ import { SLOT } from '../../helpers/slottype';
5
+ export const UniModal = (_a) => {
6
+ var _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { children, style, theme } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "children", "style", "theme"]);
7
+ // 主题样式定义
8
+ const redCss = `
9
+ // .uni-${rest.tid} .ant-modal-header {
10
+ // background: #ffeded;
11
+ // border-bottom: 2px solid #B20000;
12
+ // }
13
+ // .uni-${rest.tid} .ant-modal-title {
14
+ // color: #B20000 !important;
15
+ // }
16
+ .uni-${rest.tid} .ant-modal-footer .ant-btn-primary {
17
+ background: #B20000;
18
+ border-color: #B20000;
19
+ }
20
+ `;
21
+ const blueCss = `
22
+ // .uni-${rest.tid} .ant-modal-header {
23
+ // background: #e6f7ff;
24
+ // border-bottom: 2px solid #1890ff;
25
+ // }
26
+ // .uni-${rest.tid} .ant-modal-title {
27
+ // color: #1890ff !important;
28
+ // }
29
+ .uni-${rest.tid} .ant-modal-footer .ant-btn-primary {
30
+ background: #1890ff;
31
+ border-color: #1890ff;
32
+ }
33
+ `;
34
+ const greenCss = `
35
+ // .uni-${rest.tid} .ant-modal-header {
36
+ // background: #f6ffed;
37
+ // border-bottom: 2px solid #17c60e;
38
+ // }
39
+ // .uni-${rest.tid} .ant-modal-title {
40
+ // color: #17c60e !important;
41
+ // }
42
+ .uni-${rest.tid} .ant-modal-footer .ant-btn-primary {
43
+ background: #17c60e;
44
+ border-color: #17c60e;
45
+ }
46
+ `;
47
+ useEffect(() => {
48
+ const allow = ['blue', 'green', 'red'];
49
+ if (allow.includes(theme)) {
50
+ const css = theme === 'blue' ? blueCss : theme === 'green' ? greenCss : redCss;
51
+ const style = document.createElement('style');
52
+ style.innerHTML = css;
53
+ document.head.appendChild(style);
54
+ }
55
+ }, [theme]);
56
+ return (React.createElement(AntModal, Object.assign({ className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}`, "data-dnd": dataDnd, "data-id": rest.tid, style: style }, rest), children));
57
+ };
58
+ // 导出静态方法以支持 Modal.info() 等调用方式
59
+ UniModal.info = AntModal.info;
60
+ UniModal.success = AntModal.success;
61
+ UniModal.error = AntModal.error;
62
+ UniModal.warning = AntModal.warning;
63
+ UniModal.confirm = AntModal.confirm;
@@ -1,2 +1 @@
1
- import 'antd/dist/antd.css';
2
1
  export * from './components';
package/lib/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import 'antd/dist/antd.css';
1
+ //import 'antd/dist/antd.css';
2
2
  export * from './components';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuvp1225/antd",
3
- "version": "0.1.19-beta.35",
3
+ "version": "0.1.19-beta.37",
4
4
  "description": "antd components for tango app",
5
5
  "author": "wwsun <ww.sww@outlook.com>",
6
6
  "homepage": "https://github.com/netease/tango-components#readme",
@@ -55,5 +55,5 @@
55
55
  "classnames": "^2.3.2",
56
56
  "coral-system": "^1.0.6"
57
57
  },
58
- "gitHead": "a2d2d6722c414c78fd5d413c5bc322c4a2d89867"
58
+ "gitHead": "93ae4ee50e60e04431933cc4dc688dc5157c9a97"
59
59
  }