@cuvp1225/antd 0.1.19-beta.36 → 0.1.19-beta.38

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,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UniUpload = 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 UniUpload = (_a) => {
9
+ var
10
+ //items,
11
+ _b = slottype_1.SLOT.id,
12
+ //items,
13
+ dataId = _a[_b], _c = slottype_1.SLOT.dnd, dataDnd = _a[_c], { style, theme } = _a, rest = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style", "theme"]);
14
+ //console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
15
+ const redCss = `
16
+ .uni-${rest.tid} .ant-btn, .uni-${rest.tid} .ant-btn:hover, .uni-${rest.tid} .ant-btn:focus {
17
+ color: #fff;
18
+ border-color: #B20000;
19
+ background: #B20000;
20
+ }
21
+ `;
22
+ const blueCss = `
23
+ .uni-${rest.tid} .ant-btn, .uni-${rest.tid} .ant-btn:hover, .uni-${rest.tid} .ant-btn:focus {
24
+ color: #fff;
25
+ border-color: #1890ff;
26
+ background: #1890ff;
27
+ }
28
+ `;
29
+ const greenCss = `
30
+ .uni-${rest.tid} .ant-btn, .uni-${rest.tid} .ant-btn:hover, .uni-${rest.tid} .ant-btn:focus {
31
+ color: #fff;
32
+ border-color: #17c60e;
33
+ background: #17c60e;
34
+ }
35
+ `;
36
+ (0, react_1.useEffect)(() => {
37
+ const allow = ['blue', 'green', 'red'];
38
+ if (allow.includes(theme)) {
39
+ const css = theme === 'blue' ? blueCss : theme === 'green' ? greenCss : redCss;
40
+ const style = document.createElement('style');
41
+ style.innerHTML = css;
42
+ document.head.appendChild(style);
43
+ }
44
+ }, [theme]);
45
+ return (react_1.default.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
46
+ react_1.default.createElement(antd_1.Upload, Object.assign({ className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}` }, rest), rest.children)));
47
+ };
48
+ exports.UniUpload = UniUpload;
@@ -55,3 +55,6 @@ export { Progress } from './progress';
55
55
  export { BackTop } from './backTop';
56
56
  export { UniTabs } from './uniTabs/unitabs';
57
57
  export { UniButton, UniButtonGroup } from './uniButton/unibutton';
58
+ export { Steps } from './steps';
59
+ export { UniModal } from './uniModal/unimodal';
60
+ export { UniUpload } from './uniUpload/uniupload';
@@ -82,3 +82,6 @@ export { BackTop } from './backTop';
82
82
  //export {LineChart} from './LineChart';
83
83
  export { UniTabs } from './uniTabs/unitabs';
84
84
  export { UniButton, UniButtonGroup } from './uniButton/unibutton';
85
+ export { Steps } from './steps';
86
+ export { UniModal } from './uniModal/unimodal';
87
+ export { UniUpload } from './uniUpload/uniupload';
@@ -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
+ };
@@ -7,16 +7,16 @@ export const UniButton = (_a) => {
7
7
  const redCss = `
8
8
  .uni-${rest.tid} {
9
9
  color: #fff;
10
- border-color: #d0262f !important;
11
- background: #d0262f !important;
10
+ border-color: #B30000 !important;
11
+ background: #B30000 !important;
12
12
 
13
13
  }
14
14
 
15
15
  .uni-${rest.tid}:hover,
16
16
  .uni-${rest.tid}:focus {
17
17
  color: #fff;
18
- border-color: #d0262f !important;
19
- background: #d0262f !important;
18
+ border-color: #B30000 !important;
19
+ background: #B30000 !important;
20
20
  }
21
21
  `;
22
22
  const blueCss = `
@@ -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,42 @@
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-footer .ant-btn-primary {
10
+ background: #B20000;
11
+ border-color: #B20000;
12
+ }
13
+ `;
14
+ const blueCss = `
15
+ .uni-${rest.tid} .ant-modal-footer .ant-btn-primary {
16
+ background: #1890ff;
17
+ border-color: #1890ff;
18
+ }
19
+ `;
20
+ const greenCss = `
21
+ .uni-${rest.tid} .ant-modal-footer .ant-btn-primary {
22
+ background: #17c60e;
23
+ border-color: #17c60e;
24
+ }
25
+ `;
26
+ useEffect(() => {
27
+ const allow = ['blue', 'green', 'red'];
28
+ if (allow.includes(theme)) {
29
+ const css = theme === 'blue' ? blueCss : theme === 'green' ? greenCss : redCss;
30
+ const style = document.createElement('style');
31
+ style.innerHTML = css;
32
+ document.head.appendChild(style);
33
+ }
34
+ }, [theme]);
35
+ return (React.createElement(AntModal, Object.assign({ className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}`, "data-dnd": dataDnd, "data-id": rest.tid, style: style }, rest), children));
36
+ };
37
+ // 导出静态方法以支持 Modal.info() 等调用方式
38
+ UniModal.info = AntModal.info;
39
+ UniModal.success = AntModal.success;
40
+ UniModal.error = AntModal.error;
41
+ UniModal.warning = AntModal.warning;
42
+ UniModal.confirm = AntModal.confirm;
@@ -0,0 +1,6 @@
1
+ import { UploadProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const UniUpload: ({ [SLOT.id]: dataId, [SLOT.dnd]: dataDnd, style, theme, ...rest }: UploadProps & {
4
+ [key: string]: any;
5
+ children?: React.ReactNode;
6
+ }) => React.JSX.Element;
@@ -0,0 +1,44 @@
1
+ import { __rest } from "tslib";
2
+ import { Upload as AntUpload } from 'antd';
3
+ import React, { useEffect } from 'react';
4
+ import { SLOT } from '../../helpers/slottype';
5
+ export const UniUpload = (_a) => {
6
+ var
7
+ //items,
8
+ _b = SLOT.id,
9
+ //items,
10
+ dataId = _a[_b], _c = SLOT.dnd, dataDnd = _a[_c], { style, theme } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style", "theme"]);
11
+ //console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
12
+ const redCss = `
13
+ .uni-${rest.tid} .ant-btn, .uni-${rest.tid} .ant-btn:hover, .uni-${rest.tid} .ant-btn:focus {
14
+ color: #fff;
15
+ border-color: #B20000;
16
+ background: #B20000;
17
+ }
18
+ `;
19
+ const blueCss = `
20
+ .uni-${rest.tid} .ant-btn, .uni-${rest.tid} .ant-btn:hover, .uni-${rest.tid} .ant-btn:focus {
21
+ color: #fff;
22
+ border-color: #1890ff;
23
+ background: #1890ff;
24
+ }
25
+ `;
26
+ const greenCss = `
27
+ .uni-${rest.tid} .ant-btn, .uni-${rest.tid} .ant-btn:hover, .uni-${rest.tid} .ant-btn:focus {
28
+ color: #fff;
29
+ border-color: #17c60e;
30
+ background: #17c60e;
31
+ }
32
+ `;
33
+ useEffect(() => {
34
+ const allow = ['blue', 'green', 'red'];
35
+ if (allow.includes(theme)) {
36
+ const css = theme === 'blue' ? blueCss : theme === 'green' ? greenCss : redCss;
37
+ const style = document.createElement('style');
38
+ style.innerHTML = css;
39
+ document.head.appendChild(style);
40
+ }
41
+ }, [theme]);
42
+ return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
43
+ React.createElement(AntUpload, Object.assign({ className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}` }, rest), rest.children)));
44
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuvp1225/antd",
3
- "version": "0.1.19-beta.36",
3
+ "version": "0.1.19-beta.38",
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": "f824b786a983c0b8ec488805391e8556b386ab7a"
58
+ "gitHead": "ab36bb889b320c8bf1d324b56731ee9cd797eee0"
59
59
  }