@cuvp1225/antd 0.3.37 → 0.3.40

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.
Files changed (49) hide show
  1. package/dist/designer.js +85 -8
  2. package/dist/index.js +83 -6
  3. package/lib/cjs/components/breadcrumb.d.ts +2 -0
  4. package/lib/cjs/components/breadcrumb.js +11 -0
  5. package/lib/cjs/components/collapse.d.ts +2 -0
  6. package/lib/cjs/components/collapse.js +11 -0
  7. package/lib/cjs/components/date-picker.js +4 -5
  8. package/lib/cjs/components/dropdown.d.ts +2 -0
  9. package/lib/cjs/components/dropdown.js +11 -0
  10. package/lib/cjs/components/each.d.ts +1 -0
  11. package/lib/cjs/components/each.js +8 -0
  12. package/lib/cjs/components/index.d.ts +9 -1
  13. package/lib/cjs/components/index.js +31 -3
  14. package/lib/cjs/components/input.d.ts +2 -1
  15. package/lib/cjs/components/input.js +16 -1
  16. package/lib/cjs/components/list.d.ts +2 -0
  17. package/lib/cjs/components/list.js +11 -0
  18. package/lib/cjs/components/menu.d.ts +2 -0
  19. package/lib/cjs/components/menu.js +11 -0
  20. package/lib/cjs/components/popconfirm.js +13 -2
  21. package/lib/cjs/components/row.js +22 -18
  22. package/lib/cjs/components/timeline.d.ts +2 -0
  23. package/lib/cjs/components/timeline.js +11 -0
  24. package/lib/cjs/prototypes/form.js +19 -16
  25. package/lib/cjs/prototypes/input.js +30 -7
  26. package/lib/esm/components/breadcrumb.d.ts +2 -0
  27. package/lib/esm/components/breadcrumb.js +8 -0
  28. package/lib/esm/components/collapse.d.ts +2 -0
  29. package/lib/esm/components/collapse.js +8 -0
  30. package/lib/esm/components/date-picker.js +5 -6
  31. package/lib/esm/components/dropdown.d.ts +2 -0
  32. package/lib/esm/components/dropdown.js +8 -0
  33. package/lib/esm/components/each.d.ts +1 -0
  34. package/lib/esm/components/each.js +5 -0
  35. package/lib/esm/components/index.d.ts +9 -1
  36. package/lib/esm/components/index.js +11 -3
  37. package/lib/esm/components/input.d.ts +2 -1
  38. package/lib/esm/components/input.js +15 -0
  39. package/lib/esm/components/list.d.ts +2 -0
  40. package/lib/esm/components/list.js +8 -0
  41. package/lib/esm/components/menu.d.ts +2 -0
  42. package/lib/esm/components/menu.js +8 -0
  43. package/lib/esm/components/popconfirm.js +13 -2
  44. package/lib/esm/components/row.js +22 -18
  45. package/lib/esm/components/timeline.d.ts +2 -0
  46. package/lib/esm/components/timeline.js +8 -0
  47. package/lib/esm/prototypes/form.js +19 -16
  48. package/lib/esm/prototypes/input.js +30 -7
  49. package/package.json +3 -3
@@ -8,8 +8,19 @@ function PopconfirmDesigner(_a) {
8
8
  useEffect(() => {
9
9
  console.log('PopconfirmDesigner', dataDnd, dataId, rest);
10
10
  }, []);
11
- return (React.createElement("div", { id: "popconfirSwrapper", "data-dnd": dataDnd, "data-id": dataId },
12
- React.createElement(AntPopconfirm, Object.assign({ title: title, "data-dnd": dataDnd, "data-id": dataId }, rest, { style: style }), children)));
11
+ // 添加弹出层容器的自定义属性
12
+ const overlayProps = {
13
+ "data-dnd": dataDnd,
14
+ "data-id": dataId,
15
+ };
16
+ useEffect(() => {
17
+ const popover = document.querySelector('.ant-popconfirm');
18
+ if (popover) {
19
+ popover.setAttribute('data-dnd', dataDnd);
20
+ popover.setAttribute('data-id', dataId);
21
+ }
22
+ }, [dataDnd, dataId]);
23
+ return (React.createElement(AntPopconfirm, Object.assign({ title: title, overlayClassName: "custom-popconfirm-overlay" }, rest, { style: style }), children));
13
24
  }
14
25
  export const Popconfirm = defineComponent(AntPopconfirm, {
15
26
  name: 'Popconfirm',
@@ -1,28 +1,32 @@
1
1
  import { __rest } from "tslib";
2
2
  import React from 'react';
3
- import { css } from 'styled-components';
4
- import { coral } from 'coral-system';
5
3
  import { Row as AntRow } from 'antd';
6
4
  import { defineComponent } from '@music163/tango-boot';
7
- import { Placeholder } from './placeholder';
8
- import { ShadowContainer } from './shadow-container';
9
- const BaseRowWrapper = coral('div', css `
10
- position: relative;
11
- background-color: #fff;
12
- border: 1px solid var(--music-colors-line-normal);
13
- box-shadow: var(--music-shadows-lowDown);
14
- min-width: 600px;
15
-
16
- .RowNewPanelBody {
17
- padding: 12px;
18
- }
19
- `);
5
+ // const BaseRowWrapper = coral(
6
+ // 'div',
7
+ // css`
8
+ // position: relative;
9
+ // background-color: #fff;
10
+ // min-width: 600px;
11
+ // .RowNewPanelBody {
12
+ // padding: 12px;
13
+ // }
14
+ // `,
15
+ // );
16
+ const rowStyle = {
17
+ position: 'relative',
18
+ backgroundColor: '#fff',
19
+ minWidth: '600px',
20
+ };
21
+ // interface RowDesignerProps extends React.HTMLAttributes<HTMLDivElement> {
22
+ // style?: React.CSSProperties;
23
+ // children?: React.ReactNode;
24
+ // }
20
25
  function RowDesigner(_a) {
21
26
  var { gutter, align, justify, prefixCls, wrap, style, children } = _a, rest = __rest(_a, ["gutter", "align", "justify", "prefixCls", "wrap", "style", "children"]);
22
27
  console.log("zcq栅格行的入参", gutter, align, justify, prefixCls, wrap, style, children);
23
- return (React.createElement(ShadowContainer, Object.assign({ type: "modal", label: "Row", bg: "rgba(0, 0, 0, 0.45)", px: "100px", py: "24px" }, rest),
24
- React.createElement(BaseRowWrapper, { style: style },
25
- React.createElement("div", { className: "RowNewPanelBody" }, children || React.createElement(Placeholder, null)))));
28
+ return (React.createElement("div", { style: Object.assign(Object.assign({}, rowStyle), style) },
29
+ React.createElement("div", null, children || React.createElement("div", null, "\u62D6\u5165\u7EC4\u4EF6"))));
26
30
  }
27
31
  export const Row1 = defineComponent(AntRow, {
28
32
  name: 'Row1',
@@ -0,0 +1,2 @@
1
+ export declare const Timeline: import("react").ForwardRefExoticComponent<import("antd").TimelineProps & import("@music163/tango-boot").TangoComponentProps & import("react").RefAttributes<unknown>>;
2
+ export declare const TimelineItem: import("react").ForwardRefExoticComponent<import("antd").TimelineItemProps & import("@music163/tango-boot").TangoComponentProps & import("react").RefAttributes<unknown>>;
@@ -0,0 +1,8 @@
1
+ import { defineComponent } from '@music163/tango-boot';
2
+ import { Timeline as AntTimeline } from 'antd';
3
+ export const Timeline = defineComponent(AntTimeline, {
4
+ name: 'Timeline'
5
+ });
6
+ export const TimelineItem = defineComponent(AntTimeline.Item, {
7
+ name: 'TimelineItem',
8
+ });
@@ -40,22 +40,24 @@ export const Form = {
40
40
  package: '@cuvp1225/antd',
41
41
  help: '最基本的表单组件,可以创建一个轻量级表单。',
42
42
  hasChildren: true,
43
- initChildren: `<Form.Item label="Username" name="username" rules={[{ required: true, message: "Please input your username!" }]}>
44
- <Input />
45
- </Form.Item>
46
- <Form.Item
47
- label="Password"
48
- name="password"
49
- rules={[{ required: true, message: 'Please input your password!' }]}
50
- >
51
- <Input.Password />
52
- </Form.Item>
53
- <Form.Item wrapperCol={{ offset: 8, span: 16 }}>
54
- <Button type="primary" htmlType="submit">
55
- Submit
56
- </Button>
57
- </Form.Item>`,
58
- relatedImports: ['FormItem', 'FormFooter', 'Button'],
43
+ // initChildren:
44
+ // `<Form.Item label="Username" name="username" rules={[{ required: true, message: "Please input your username!" }]}>
45
+ // <Input />
46
+ // </Form.Item>
47
+ // <Form.Item
48
+ // label="Password"
49
+ // name="password"
50
+ // rules={[{ required: true, message: 'Please input your password!' }]}
51
+ // >
52
+ // <Input.Password />
53
+ // </Form.Item>
54
+ // <Form.Item wrapperCol={{ offset: 8, span: 16 }}>
55
+ // <Button type="primary" htmlType="submit">
56
+ // Submit
57
+ // </Button>
58
+ // </Form.Item>`,
59
+ initChildren: '<FormItem component="Input" label="表单项" ><div><Placeholder></Placeholder></div></FormItem><FormItem component="Input" label="表单项" ><div><Placeholder></Placeholder></div></FormItem><FormItem component="Input" label="表单项" ><div><Placeholder></Placeholder></div></FormItem><FormItem wrapperCol={{offset: 8,span: 16,}}><Button type="primary" htmlType="submit">提交</Button></FormItem>',
60
+ relatedImports: ['FormItem', 'FormFooter', 'Button', 'Input'],
59
61
  childrenName: ['FormItem', 'Fieldset', 'FormFooter'],
60
62
  props: [
61
63
  ...StylePrototypes,
@@ -181,6 +183,7 @@ export const FormItem = {
181
183
  package: '@cuvp1225/antd',
182
184
  help: '一个基本的表单项',
183
185
  hasChildren: true,
186
+ initChildren: '<div><Placeholder></Placeholder></div>',
184
187
  props: [
185
188
  ...StylePrototypes,
186
189
  {
@@ -28,6 +28,36 @@ export const Input = {
28
28
  setter: 'textSetter',
29
29
  group: 'basic',
30
30
  },
31
+ {
32
+ name: 'type',
33
+ title: '类型',
34
+ tip: '声明 input 类型,同原生 input 标签的 type 属性',
35
+ setter: 'choiceSetter',
36
+ setterProps: {
37
+ options: [
38
+ { label: '文本', value: 'text' },
39
+ { label: '密码', value: 'password' },
40
+ { label: '数字', value: 'number' },
41
+ { label: '颜色', value: 'color' },
42
+ { label: '电话', value: 'tel' },
43
+ { label: '搜索', value: 'search' },
44
+ { label: '电子邮件', value: 'email' },
45
+ { label: '网址', value: 'url' },
46
+ { label: '日期', value: 'date' },
47
+ { label: '月份', value: 'month' },
48
+ { label: '周', value: 'week' },
49
+ { label: '时间', value: 'time' },
50
+ { label: '日期时间', value: 'datetime-local' },
51
+ { label: '文件', value: 'file' },
52
+ { label: '提交', value: 'submit' },
53
+ { label: '重置', value: 'reset' },
54
+ { label: '图像', value: 'image' },
55
+ { label: '按钮', value: 'button' },
56
+ { label: '范围', value: 'range' }
57
+ ],
58
+ },
59
+ group: 'basic',
60
+ },
31
61
  {
32
62
  name: 'maxLength',
33
63
  title: '最大长度',
@@ -99,13 +129,6 @@ export const Input = {
99
129
  setter: 'iconSetter',
100
130
  group: 'advanced',
101
131
  },
102
- {
103
- name: 'type',
104
- title: '类型',
105
- tip: '声明 input 类型,同原生 input 标签的 type 属性',
106
- setter: 'textSetter',
107
- group: 'advanced',
108
- },
109
132
  {
110
133
  name: 'onPressEnter',
111
134
  title: '回车回调',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuvp1225/antd",
3
- "version": "0.3.37",
3
+ "version": "0.3.40",
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",
@@ -48,11 +48,11 @@
48
48
  "dependencies": {
49
49
  "@cuvp1225/formily": "^0.2.6",
50
50
  "@cuvp1225/foundation": "^0.3.2",
51
- "@music163/tango-boot": "^0.3.3",
51
+ "@music163/tango-boot": "0.3.5",
52
52
  "@music163/tango-helpers": "1.2.8",
53
53
  "antd": "4",
54
54
  "classnames": "^2.3.2",
55
55
  "coral-system": "^1.0.6"
56
56
  },
57
- "gitHead": "5a02ab8c904bdd59d746c45847aac79832ecef55"
57
+ "gitHead": "7fc136c6e7de89550d2ffc92f2b819d76c952594"
58
58
  }