@plasmicpkgs/antd 2.0.19 → 2.0.21
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/.tsbuildinfo +1 -0
- package/dist/antd.esm.js +703 -616
- package/dist/antd.esm.js.map +1 -1
- package/dist/customControls.d.ts +17 -17
- package/dist/index.d.ts +16 -16
- package/dist/index.js +2352 -5
- package/dist/index.js.map +1 -0
- package/dist/registerButton.d.ts +5 -5
- package/dist/registerCarousel.d.ts +5 -5
- package/dist/registerCheckbox.d.ts +8 -8
- package/dist/registerCollapse.d.ts +14 -14
- package/dist/registerDropdown.d.ts +11 -11
- package/dist/registerInput.d.ts +14 -14
- package/dist/registerMenu.d.ts +15 -15
- package/dist/registerOption.d.ts +8 -8
- package/dist/registerRate.d.ts +5 -5
- package/dist/registerSelect.d.ts +8 -8
- package/dist/registerSlider.d.ts +19 -19
- package/dist/registerSwitch.d.ts +5 -5
- package/dist/registerTable.d.ts +30 -30
- package/dist/registerTabs.d.ts +14 -13
- package/dist/registerable.d.ts +4 -4
- package/package.json +10 -9
- package/skinny/customControls-fb0b7e5f.js +22 -0
- package/skinny/{customControls-ff79afdf.js.map → customControls-fb0b7e5f.js.map} +1 -1
- package/skinny/customControls.d.ts +17 -17
- package/skinny/registerButton.d.ts +5 -5
- package/skinny/registerButton.js +80 -81
- package/skinny/registerButton.js.map +1 -1
- package/skinny/registerCarousel.d.ts +5 -5
- package/skinny/registerCarousel.js +66 -67
- package/skinny/registerCarousel.js.map +1 -1
- package/skinny/registerCheckbox.d.ts +8 -8
- package/skinny/registerCheckbox.js +125 -121
- package/skinny/registerCheckbox.js.map +1 -1
- package/skinny/registerCollapse.d.ts +14 -14
- package/skinny/registerCollapse.js +174 -153
- package/skinny/registerCollapse.js.map +1 -1
- package/skinny/registerDropdown.d.ts +11 -11
- package/skinny/registerDropdown.js +175 -171
- package/skinny/registerDropdown.js.map +1 -1
- package/skinny/registerInput.d.ts +14 -14
- package/skinny/registerInput.js +362 -312
- package/skinny/registerInput.js.map +1 -1
- package/skinny/registerMenu.d.ts +15 -15
- package/skinny/registerMenu.js +275 -298
- package/skinny/registerMenu.js.map +1 -1
- package/skinny/registerOption.d.ts +8 -8
- package/skinny/registerOption.js +73 -81
- package/skinny/registerOption.js.map +1 -1
- package/skinny/registerRate.d.ts +5 -5
- package/skinny/registerRate.js +66 -0
- package/skinny/registerRate.js.map +1 -0
- package/skinny/registerSelect.d.ts +8 -8
- package/skinny/registerSelect.js +129 -130
- package/skinny/registerSelect.js.map +1 -1
- package/skinny/registerSlider.d.ts +19 -19
- package/skinny/registerSlider.js +132 -104
- package/skinny/registerSlider.js.map +1 -1
- package/skinny/registerSwitch.d.ts +5 -5
- package/skinny/registerSwitch.js +55 -56
- package/skinny/registerSwitch.js.map +1 -1
- package/skinny/registerTable.d.ts +30 -30
- package/skinny/registerTable.js +202 -183
- package/skinny/registerTable.js.map +1 -1
- package/skinny/registerTabs.d.ts +14 -13
- package/skinny/registerTabs.js +344 -311
- package/skinny/registerTabs.js.map +1 -1
- package/skinny/registerable.d.ts +4 -4
- package/skinny/registerable.js +3 -0
- package/skinny/registerable.js.map +1 -0
- package/dist/antd.cjs.development.js +0 -2243
- package/dist/antd.cjs.development.js.map +0 -1
- package/dist/antd.cjs.production.min.js +0 -2
- package/dist/antd.cjs.production.min.js.map +0 -1
- package/skinny/customControls-ff79afdf.js +0 -27
- package/skinny/index.d.ts +0 -16
- package/skinny/tslib.es6-b92c4a81.js +0 -59
- package/skinny/tslib.es6-b92c4a81.js.map +0 -1
package/dist/registerTable.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { ComponentMeta } from "@plasmicapp/host";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { Registerable } from "./registerable";
|
|
4
|
-
interface TableColumnProps {
|
|
5
|
-
columnIndex: number;
|
|
6
|
-
title?: string;
|
|
7
|
-
dataIndex: string | string[];
|
|
8
|
-
columnTemplate: React.ReactNode;
|
|
9
|
-
}
|
|
10
|
-
export declare function TableColumn(_props: TableColumnProps): null;
|
|
11
|
-
export interface TableValueProps {
|
|
12
|
-
className?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare function TableValue(props: TableValueProps): JSX.Element;
|
|
15
|
-
export interface TableWrapperProps {
|
|
16
|
-
className?: string;
|
|
17
|
-
items: Array<any>;
|
|
18
|
-
columns: React.ReactNode;
|
|
19
|
-
size?: string;
|
|
20
|
-
pagination?: boolean;
|
|
21
|
-
onSelect?: (record: any) => void;
|
|
22
|
-
}
|
|
23
|
-
export declare function TableWrapper(props: TableWrapperProps): JSX.Element;
|
|
24
|
-
export declare const tableMeta: ComponentMeta<TableWrapperProps>;
|
|
25
|
-
export declare const tableColumnMeta: ComponentMeta<TableColumnProps>;
|
|
26
|
-
export declare const tableValueMeta: ComponentMeta<TableValueProps>;
|
|
27
|
-
export declare function registerTable(loader?: Registerable, customMeta?: ComponentMeta<TableWrapperProps>): void;
|
|
28
|
-
export declare function registerTableColumn(loader?: Registerable, customMeta?: ComponentMeta<TableColumnProps>): void;
|
|
29
|
-
export declare function registerTableValue(loader?: Registerable, customMeta?: ComponentMeta<TableValueProps>): void;
|
|
30
|
-
export {};
|
|
1
|
+
import { ComponentMeta } from "@plasmicapp/host";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Registerable } from "./registerable";
|
|
4
|
+
interface TableColumnProps {
|
|
5
|
+
columnIndex: number;
|
|
6
|
+
title?: string;
|
|
7
|
+
dataIndex: string | string[];
|
|
8
|
+
columnTemplate: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function TableColumn(_props: TableColumnProps): null;
|
|
11
|
+
export interface TableValueProps {
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function TableValue(props: TableValueProps): JSX.Element;
|
|
15
|
+
export interface TableWrapperProps {
|
|
16
|
+
className?: string;
|
|
17
|
+
items: Array<any>;
|
|
18
|
+
columns: React.ReactNode;
|
|
19
|
+
size?: string;
|
|
20
|
+
pagination?: boolean;
|
|
21
|
+
onSelect?: (record: any) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function TableWrapper(props: TableWrapperProps): JSX.Element;
|
|
24
|
+
export declare const tableMeta: ComponentMeta<TableWrapperProps>;
|
|
25
|
+
export declare const tableColumnMeta: ComponentMeta<TableColumnProps>;
|
|
26
|
+
export declare const tableValueMeta: ComponentMeta<TableValueProps>;
|
|
27
|
+
export declare function registerTable(loader?: Registerable, customMeta?: ComponentMeta<TableWrapperProps>): void;
|
|
28
|
+
export declare function registerTableColumn(loader?: Registerable, customMeta?: ComponentMeta<TableColumnProps>): void;
|
|
29
|
+
export declare function registerTableValue(loader?: Registerable, customMeta?: ComponentMeta<TableValueProps>): void;
|
|
30
|
+
export {};
|
package/dist/registerTabs.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
import { TabPaneProps, TabsProps as AntdTabsProps } from "antd/lib/tabs";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { Registerable } from "./registerable";
|
|
5
|
-
export declare const
|
|
6
|
-
export declare
|
|
7
|
-
export declare
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export declare
|
|
13
|
-
export declare
|
|
1
|
+
import { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
+
import { TabPaneProps, TabsProps as AntdTabsProps } from "antd/lib/tabs";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Registerable } from "./registerable";
|
|
5
|
+
export declare const TabPane: React.FC<TabPaneProps>;
|
|
6
|
+
export declare const tabPaneMeta: ComponentMeta<TabPaneProps>;
|
|
7
|
+
export declare function registerTabPane(loader?: Registerable, customTabPaneMeta?: ComponentMeta<TabPaneProps>): void;
|
|
8
|
+
export type TabsProps = Omit<AntdTabsProps, "tabBarExtraContent"> & {
|
|
9
|
+
leftTabBarExtraContent?: React.ReactNode;
|
|
10
|
+
rightTabBarExtraContent?: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
export declare function Tabs(props: TabsProps): JSX.Element;
|
|
13
|
+
export declare const tabsMeta: ComponentMeta<TabsProps>;
|
|
14
|
+
export declare function registerTabs(loader?: Registerable, customTabsMeta?: ComponentMeta<TabsProps>): void;
|
package/dist/registerable.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import registerComponent from "@plasmicapp/host/registerComponent";
|
|
2
|
-
export
|
|
3
|
-
registerComponent: typeof registerComponent;
|
|
4
|
-
};
|
|
1
|
+
import registerComponent from "@plasmicapp/host/registerComponent";
|
|
2
|
+
export type Registerable = {
|
|
3
|
+
registerComponent: typeof registerComponent;
|
|
4
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicpkgs/antd",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.21",
|
|
4
4
|
"description": "Plasmic registration calls for antd components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,30 +20,31 @@
|
|
|
20
20
|
}
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
|
-
"build": "
|
|
24
|
-
"
|
|
25
|
-
"test": "tsdx test --passWithNoTests",
|
|
26
|
-
"lint": "tsdx lint",
|
|
23
|
+
"build": "rollup -c rollup.config.mjs && yarn copy_css_files && yarn gentypes",
|
|
24
|
+
"gentypes": "./node_modules/.bin/tsc --emitDeclarationOnly --declaration src/index.ts --incremental --tsBuildInfoFile ./dist/.tsbuildinfo --skipLibCheck --jsx react --esModuleInterop --strict --outDir ./dist/ && cp ./dist/*.d.ts skinny/ && rm skinny/index.d.ts",
|
|
27
25
|
"prepare": "if-env PREPARE_NO_BUILD=true || yarn build",
|
|
28
26
|
"copy_css_files": "cp src/*.css dist/",
|
|
29
27
|
"size": "size-limit",
|
|
30
28
|
"analyze": "size-limit --why"
|
|
31
29
|
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"antd": "^4.19.5"
|
|
32
|
+
},
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"@plasmicapp/host": "1.0.105",
|
|
34
35
|
"@size-limit/preset-small-lib": "^4.11.0",
|
|
35
36
|
"@types/node": "^14.0.26",
|
|
36
|
-
"antd": "^4.17.2",
|
|
37
37
|
"react": "^18.2.0",
|
|
38
38
|
"react-dom": "^18.2.0",
|
|
39
|
+
"rollup-plugin-esbuild": "^5.0.0",
|
|
40
|
+
"rollup-plugin-replace-imports": "^1.0.0",
|
|
39
41
|
"size-limit": "^4.11.0",
|
|
40
42
|
"tsdx": "^0.14.1",
|
|
41
|
-
"typescript": "^
|
|
43
|
+
"typescript": "^4.6.4"
|
|
42
44
|
},
|
|
43
45
|
"peerDependencies": {
|
|
44
46
|
"@plasmicapp/host": "^1.0.0",
|
|
45
|
-
"antd": "^4.0.0",
|
|
46
47
|
"react": ">=16.8.0"
|
|
47
48
|
},
|
|
48
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "77fee038d8d59a70f0f5ed9edf69388dfb63fa44"
|
|
49
50
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function traverseReactEltTree(children, callback) {
|
|
4
|
+
const rec = (elts) => {
|
|
5
|
+
(Array.isArray(elts) ? elts : [elts]).forEach((elt) => {
|
|
6
|
+
var _a;
|
|
7
|
+
if (elt) {
|
|
8
|
+
callback(elt);
|
|
9
|
+
if (elt.children) {
|
|
10
|
+
rec(elt.children);
|
|
11
|
+
}
|
|
12
|
+
if (((_a = elt.props) == null ? void 0 : _a.children) && elt.props.children !== elt.children) {
|
|
13
|
+
rec(elt.props.children);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
rec(children);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
exports.traverseReactEltTree = traverseReactEltTree;
|
|
22
|
+
//# sourceMappingURL=customControls-fb0b7e5f.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customControls-
|
|
1
|
+
{"version":3,"file":"customControls-fb0b7e5f.js","sources":["../src/customControls.ts"],"sourcesContent":["import type React from \"react\";\n\ntype ReactElt = {\n children: ReactElt | ReactElt[];\n props: {\n children: ReactElt | ReactElt[];\n [prop: string]: any;\n } | null;\n type: React.ComponentType<any> | null;\n key: string | null;\n} | null;\n\n/**\n * Traverses the tree of elements from a `React.createElement`. Notice we can't\n * traverse elements created within the children's render function since this is\n * the tree before rendering.\n */\nexport function traverseReactEltTree(\n children: React.ReactNode,\n callback: (elt: ReactElt) => void\n) {\n const rec = (elts: ReactElt | ReactElt[] | null) => {\n (Array.isArray(elts) ? elts : [elts]).forEach((elt) => {\n if (elt) {\n callback(elt);\n if (elt.children) {\n rec(elt.children);\n }\n if (elt.props?.children && elt.props.children !== elt.children) {\n rec(elt.props.children);\n }\n }\n });\n };\n rec(children as any);\n}\n"],"names":[],"mappings":";;AAiBO,SAAA,oBAAA,CACL,UACA,QACA,EAAA;AACA,EAAM,MAAA,GAAA,GAAM,CAAC,IAAuC,KAAA;AAClD,IAAC,CAAA,KAAA,CAAM,OAAQ,CAAA,IAAI,CAAI,GAAA,IAAA,GAAO,CAAC,IAAI,CAAA,EAAG,OAAQ,CAAA,CAAC,GAAQ,KAAA;AAtB3D,MAAA,IAAA,EAAA,CAAA;AAuBM,MAAA,IAAI,GAAK,EAAA;AACP,QAAA,QAAA,CAAS,GAAG,CAAA,CAAA;AACZ,QAAA,IAAI,IAAI,QAAU,EAAA;AAChB,UAAA,GAAA,CAAI,IAAI,QAAQ,CAAA,CAAA;AAAA,SAClB;AACA,QAAI,IAAA,CAAA,CAAA,EAAA,GAAA,GAAA,CAAI,UAAJ,IAAW,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,QAAA,KAAY,IAAI,KAAM,CAAA,QAAA,KAAa,IAAI,QAAU,EAAA;AAC9D,UAAI,GAAA,CAAA,GAAA,CAAI,MAAM,QAAQ,CAAA,CAAA;AAAA,SACxB;AAAA,OACF;AAAA,KACD,CAAA,CAAA;AAAA,GACH,CAAA;AACA,EAAA,GAAA,CAAI,QAAe,CAAA,CAAA;AACrB;;;;"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type React from "react";
|
|
2
|
-
|
|
3
|
-
children: ReactElt | ReactElt[];
|
|
4
|
-
props: {
|
|
5
|
-
children: ReactElt | ReactElt[];
|
|
6
|
-
[prop: string]: any;
|
|
7
|
-
} | null;
|
|
8
|
-
type: React.ComponentType<any> | null;
|
|
9
|
-
key: string | null;
|
|
10
|
-
} | null;
|
|
11
|
-
/**
|
|
12
|
-
* Traverses the tree of elements from a `React.createElement`. Notice we can't
|
|
13
|
-
* traverse elements created within the children's render function since this is
|
|
14
|
-
* the tree before rendering.
|
|
15
|
-
*/
|
|
16
|
-
export declare function traverseReactEltTree(children: React.ReactNode, callback: (elt: ReactElt) => void): void;
|
|
17
|
-
export {};
|
|
1
|
+
import type React from "react";
|
|
2
|
+
type ReactElt = {
|
|
3
|
+
children: ReactElt | ReactElt[];
|
|
4
|
+
props: {
|
|
5
|
+
children: ReactElt | ReactElt[];
|
|
6
|
+
[prop: string]: any;
|
|
7
|
+
} | null;
|
|
8
|
+
type: React.ComponentType<any> | null;
|
|
9
|
+
key: string | null;
|
|
10
|
+
} | null;
|
|
11
|
+
/**
|
|
12
|
+
* Traverses the tree of elements from a `React.createElement`. Notice we can't
|
|
13
|
+
* traverse elements created within the children's render function since this is
|
|
14
|
+
* the tree before rendering.
|
|
15
|
+
*/
|
|
16
|
+
export declare function traverseReactEltTree(children: React.ReactNode, callback: (elt: ReactElt) => void): void;
|
|
17
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
import { ButtonProps } from "antd/lib/button";
|
|
3
|
-
import { Registerable } from "./registerable";
|
|
4
|
-
export declare const buttonMeta: ComponentMeta<ButtonProps>;
|
|
5
|
-
export declare function registerButton(loader?: Registerable, customButtonMeta?: ComponentMeta<ButtonProps>): void;
|
|
1
|
+
import { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
+
import { ButtonProps } from "antd/lib/button";
|
|
3
|
+
import { Registerable } from "./registerable";
|
|
4
|
+
export declare const buttonMeta: ComponentMeta<ButtonProps>;
|
|
5
|
+
export declare function registerButton(loader?: Registerable, customButtonMeta?: ComponentMeta<ButtonProps>): void;
|
package/skinny/registerButton.js
CHANGED
|
@@ -3,87 +3,86 @@
|
|
|
3
3
|
var registerComponent = require('@plasmicapp/host/registerComponent');
|
|
4
4
|
var Button = require('antd/lib/button');
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
doRegisterComponent(Button, customButtonMeta !== null && customButtonMeta !== void 0 ? customButtonMeta : buttonMeta);
|
|
6
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
|
|
8
|
+
var registerComponent__default = /*#__PURE__*/_interopDefault(registerComponent);
|
|
9
|
+
var Button__default = /*#__PURE__*/_interopDefault(Button);
|
|
10
|
+
|
|
11
|
+
const buttonMeta = {
|
|
12
|
+
name: "AntdButton",
|
|
13
|
+
displayName: "Antd Button",
|
|
14
|
+
props: {
|
|
15
|
+
type: {
|
|
16
|
+
type: "choice",
|
|
17
|
+
options: ["default", "primary", "ghost", "dashed", "link", "text"],
|
|
18
|
+
description: "Can be set to primary, ghost, dashed, link, text, default",
|
|
19
|
+
defaultValueHint: "default"
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
type: "choice",
|
|
23
|
+
options: ["small", "medium", "large"],
|
|
24
|
+
description: "Set the size of button",
|
|
25
|
+
defaultValueHint: "medium"
|
|
26
|
+
},
|
|
27
|
+
shape: {
|
|
28
|
+
type: "choice",
|
|
29
|
+
options: ["default", "circle", "round"],
|
|
30
|
+
description: "Can be set button shape",
|
|
31
|
+
defaultValueHint: "default"
|
|
32
|
+
},
|
|
33
|
+
disabled: {
|
|
34
|
+
type: "boolean",
|
|
35
|
+
description: "Disabled state of button",
|
|
36
|
+
defaultValueHint: false
|
|
37
|
+
},
|
|
38
|
+
ghost: {
|
|
39
|
+
type: "boolean",
|
|
40
|
+
description: "Make background transparent and invert text and border colors",
|
|
41
|
+
defaultValueHint: false
|
|
42
|
+
},
|
|
43
|
+
danger: {
|
|
44
|
+
type: "boolean",
|
|
45
|
+
description: "Set the danger status of button",
|
|
46
|
+
defaultValueHint: false
|
|
47
|
+
},
|
|
48
|
+
block: {
|
|
49
|
+
type: "boolean",
|
|
50
|
+
description: "Option to fit button width to its parent width",
|
|
51
|
+
defaultValueHint: false
|
|
52
|
+
},
|
|
53
|
+
loading: {
|
|
54
|
+
type: "boolean",
|
|
55
|
+
description: "Set the loading status of button",
|
|
56
|
+
defaultValueHint: false
|
|
57
|
+
},
|
|
58
|
+
href: {
|
|
59
|
+
type: "string",
|
|
60
|
+
description: "Redirect url of link button"
|
|
61
|
+
},
|
|
62
|
+
target: {
|
|
63
|
+
type: "choice",
|
|
64
|
+
options: ["_blank", "_self", "_parent", "_top"],
|
|
65
|
+
description: "Same as target attribute of a, works when href is specified",
|
|
66
|
+
hidden: (props) => !props.href,
|
|
67
|
+
defaultValueHint: "_self"
|
|
68
|
+
},
|
|
69
|
+
children: {
|
|
70
|
+
type: "slot",
|
|
71
|
+
defaultValue: [
|
|
72
|
+
{
|
|
73
|
+
type: "text",
|
|
74
|
+
value: "Button"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
importPath: "antd/lib/button",
|
|
80
|
+
isDefaultExport: true,
|
|
81
|
+
importName: "Button"
|
|
82
|
+
};
|
|
83
|
+
function registerButton(loader, customButtonMeta) {
|
|
84
|
+
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent__default.default(...args);
|
|
85
|
+
doRegisterComponent(Button__default.default, customButtonMeta != null ? customButtonMeta : buttonMeta);
|
|
87
86
|
}
|
|
88
87
|
|
|
89
88
|
exports.buttonMeta = buttonMeta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerButton.js","sources":["../src/registerButton.ts"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport Button, { ButtonProps } from \"antd/lib/button\";\nimport { Registerable } from \"./registerable\";\nexport const buttonMeta: ComponentMeta<ButtonProps> = {\n name: \"AntdButton\",\n displayName: \"Antd Button\",\n props: {\n type: {\n type: \"choice\",\n options: [\"default\", \"primary\", \"ghost\", \"dashed\", \"link\", \"text\"],\n description: \"Can be set to primary, ghost, dashed, link, text, default\",\n defaultValueHint: \"default\",\n },\n size: {\n type: \"choice\",\n options: [\"small\", \"medium\", \"large\"],\n description: \"Set the size of button\",\n defaultValueHint: \"medium\",\n },\n shape: {\n type: \"choice\",\n options: [\"default\", \"circle\", \"round\"],\n description: \"Can be set button shape\",\n defaultValueHint: \"default\",\n },\n disabled: {\n type: \"boolean\",\n description: \"Disabled state of button\",\n defaultValueHint: false,\n },\n ghost: {\n type: \"boolean\",\n description:\n \"Make background transparent and invert text and border colors\",\n defaultValueHint: false,\n },\n danger: {\n type: \"boolean\",\n description: \"Set the danger status of button\",\n defaultValueHint: false,\n },\n block: {\n type: \"boolean\",\n description: \"Option to fit button width to its parent width\",\n defaultValueHint: false,\n },\n loading: {\n type: \"boolean\",\n description: \"Set the loading status of button\",\n defaultValueHint: false,\n },\n href: {\n type: \"string\",\n description: \"Redirect url of link button\",\n },\n target: {\n type: \"choice\",\n options: [\"_blank\", \"_self\", \"_parent\", \"_top\"],\n description:\n \"Same as target attribute of a, works when href is specified\",\n hidden: props => !props.href,\n defaultValueHint: \"_self\",\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"text\",\n value: \"Button\",\n },\n ],\n },\n },\n importPath: \"antd/lib/button\",\n isDefaultExport: true,\n importName: \"Button\",\n};\n\nexport function registerButton(\n loader?: Registerable,\n customButtonMeta?: ComponentMeta<ButtonProps>\n) {\n const doRegisterComponent: typeof registerComponent = (...args) =>\n loader ? loader.registerComponent(...args) : registerComponent(...args);\n doRegisterComponent(Button, customButtonMeta ?? buttonMeta);\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registerButton.js","sources":["../src/registerButton.ts"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport Button, { ButtonProps } from \"antd/lib/button\";\nimport { Registerable } from \"./registerable\";\nexport const buttonMeta: ComponentMeta<ButtonProps> = {\n name: \"AntdButton\",\n displayName: \"Antd Button\",\n props: {\n type: {\n type: \"choice\",\n options: [\"default\", \"primary\", \"ghost\", \"dashed\", \"link\", \"text\"],\n description: \"Can be set to primary, ghost, dashed, link, text, default\",\n defaultValueHint: \"default\",\n },\n size: {\n type: \"choice\",\n options: [\"small\", \"medium\", \"large\"],\n description: \"Set the size of button\",\n defaultValueHint: \"medium\",\n },\n shape: {\n type: \"choice\",\n options: [\"default\", \"circle\", \"round\"],\n description: \"Can be set button shape\",\n defaultValueHint: \"default\",\n },\n disabled: {\n type: \"boolean\",\n description: \"Disabled state of button\",\n defaultValueHint: false,\n },\n ghost: {\n type: \"boolean\",\n description:\n \"Make background transparent and invert text and border colors\",\n defaultValueHint: false,\n },\n danger: {\n type: \"boolean\",\n description: \"Set the danger status of button\",\n defaultValueHint: false,\n },\n block: {\n type: \"boolean\",\n description: \"Option to fit button width to its parent width\",\n defaultValueHint: false,\n },\n loading: {\n type: \"boolean\",\n description: \"Set the loading status of button\",\n defaultValueHint: false,\n },\n href: {\n type: \"string\",\n description: \"Redirect url of link button\",\n },\n target: {\n type: \"choice\",\n options: [\"_blank\", \"_self\", \"_parent\", \"_top\"],\n description:\n \"Same as target attribute of a, works when href is specified\",\n hidden: props => !props.href,\n defaultValueHint: \"_self\",\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"text\",\n value: \"Button\",\n },\n ],\n },\n },\n importPath: \"antd/lib/button\",\n isDefaultExport: true,\n importName: \"Button\",\n};\n\nexport function registerButton(\n loader?: Registerable,\n customButtonMeta?: ComponentMeta<ButtonProps>\n) {\n const doRegisterComponent: typeof registerComponent = (...args) =>\n loader ? loader.registerComponent(...args) : registerComponent(...args);\n doRegisterComponent(Button, customButtonMeta ?? buttonMeta);\n}\n"],"names":["registerComponent","Button"],"mappings":";;;;;;;;;;AAKO,MAAM,UAAyC,GAAA;AAAA,EACpD,IAAM,EAAA,YAAA;AAAA,EACN,WAAa,EAAA,aAAA;AAAA,EACb,KAAO,EAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,IAAM,EAAA,QAAA;AAAA,MACN,SAAS,CAAC,SAAA,EAAW,WAAW,OAAS,EAAA,QAAA,EAAU,QAAQ,MAAM,CAAA;AAAA,MACjE,WAAa,EAAA,2DAAA;AAAA,MACb,gBAAkB,EAAA,SAAA;AAAA,KACpB;AAAA,IACA,IAAM,EAAA;AAAA,MACJ,IAAM,EAAA,QAAA;AAAA,MACN,OAAS,EAAA,CAAC,OAAS,EAAA,QAAA,EAAU,OAAO,CAAA;AAAA,MACpC,WAAa,EAAA,wBAAA;AAAA,MACb,gBAAkB,EAAA,QAAA;AAAA,KACpB;AAAA,IACA,KAAO,EAAA;AAAA,MACL,IAAM,EAAA,QAAA;AAAA,MACN,OAAS,EAAA,CAAC,SAAW,EAAA,QAAA,EAAU,OAAO,CAAA;AAAA,MACtC,WAAa,EAAA,yBAAA;AAAA,MACb,gBAAkB,EAAA,SAAA;AAAA,KACpB;AAAA,IACA,QAAU,EAAA;AAAA,MACR,IAAM,EAAA,SAAA;AAAA,MACN,WAAa,EAAA,0BAAA;AAAA,MACb,gBAAkB,EAAA,KAAA;AAAA,KACpB;AAAA,IACA,KAAO,EAAA;AAAA,MACL,IAAM,EAAA,SAAA;AAAA,MACN,WACE,EAAA,+DAAA;AAAA,MACF,gBAAkB,EAAA,KAAA;AAAA,KACpB;AAAA,IACA,MAAQ,EAAA;AAAA,MACN,IAAM,EAAA,SAAA;AAAA,MACN,WAAa,EAAA,iCAAA;AAAA,MACb,gBAAkB,EAAA,KAAA;AAAA,KACpB;AAAA,IACA,KAAO,EAAA;AAAA,MACL,IAAM,EAAA,SAAA;AAAA,MACN,WAAa,EAAA,gDAAA;AAAA,MACb,gBAAkB,EAAA,KAAA;AAAA,KACpB;AAAA,IACA,OAAS,EAAA;AAAA,MACP,IAAM,EAAA,SAAA;AAAA,MACN,WAAa,EAAA,kCAAA;AAAA,MACb,gBAAkB,EAAA,KAAA;AAAA,KACpB;AAAA,IACA,IAAM,EAAA;AAAA,MACJ,IAAM,EAAA,QAAA;AAAA,MACN,WAAa,EAAA,6BAAA;AAAA,KACf;AAAA,IACA,MAAQ,EAAA;AAAA,MACN,IAAM,EAAA,QAAA;AAAA,MACN,OAAS,EAAA,CAAC,QAAU,EAAA,OAAA,EAAS,WAAW,MAAM,CAAA;AAAA,MAC9C,WACE,EAAA,6DAAA;AAAA,MACF,MAAA,EAAQ,CAAS,KAAA,KAAA,CAAC,KAAM,CAAA,IAAA;AAAA,MACxB,gBAAkB,EAAA,OAAA;AAAA,KACpB;AAAA,IACA,QAAU,EAAA;AAAA,MACR,IAAM,EAAA,MAAA;AAAA,MACN,YAAc,EAAA;AAAA,QACZ;AAAA,UACE,IAAM,EAAA,MAAA;AAAA,UACN,KAAO,EAAA,QAAA;AAAA,SACT;AAAA,OACF;AAAA,KACF;AAAA,GACF;AAAA,EACA,UAAY,EAAA,iBAAA;AAAA,EACZ,eAAiB,EAAA,IAAA;AAAA,EACjB,UAAY,EAAA,QAAA;AACd,EAAA;AAEO,SAAA,cAAA,CACL,QACA,gBACA,EAAA;AACA,EAAM,MAAA,mBAAA,GAAgD,CAAI,GAAA,IAAA,KACxD,MAAS,GAAA,MAAA,CAAO,iBAAkB,CAAA,GAAG,IAAI,CAAA,GAAIA,kCAAkB,CAAA,GAAG,IAAI,CAAA,CAAA;AACxE,EAAoB,mBAAA,CAAAC,uBAAA,EAAQ,8CAAoB,UAAU,CAAA,CAAA;AAC5D;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
import { CarouselProps } from "antd/lib/carousel";
|
|
3
|
-
import { Registerable } from "./registerable";
|
|
4
|
-
export declare const carouselMeta: ComponentMeta<CarouselProps>;
|
|
5
|
-
export declare function registerCarousel(loader?: Registerable, customCarouselMeta?: ComponentMeta<CarouselProps>): void;
|
|
1
|
+
import { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
+
import { CarouselProps } from "antd/lib/carousel";
|
|
3
|
+
import { Registerable } from "./registerable";
|
|
4
|
+
export declare const carouselMeta: ComponentMeta<CarouselProps>;
|
|
5
|
+
export declare function registerCarousel(loader?: Registerable, customCarouselMeta?: ComponentMeta<CarouselProps>): void;
|
|
@@ -3,73 +3,72 @@
|
|
|
3
3
|
var registerComponent = require('@plasmicapp/host/registerComponent');
|
|
4
4
|
var Carousel = require('antd/lib/carousel');
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
doRegisterComponent(Carousel, customCarouselMeta !== null && customCarouselMeta !== void 0 ? customCarouselMeta : carouselMeta);
|
|
6
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
|
|
8
|
+
var registerComponent__default = /*#__PURE__*/_interopDefault(registerComponent);
|
|
9
|
+
var Carousel__default = /*#__PURE__*/_interopDefault(Carousel);
|
|
10
|
+
|
|
11
|
+
const contentStyle = {
|
|
12
|
+
height: "160px",
|
|
13
|
+
color: "#fff",
|
|
14
|
+
lineHeight: "160px",
|
|
15
|
+
textAlign: "center",
|
|
16
|
+
backgroundColor: "#364d79"
|
|
17
|
+
};
|
|
18
|
+
const carouselMeta = {
|
|
19
|
+
name: "AntdCarousel",
|
|
20
|
+
displayName: "Antd Carousel",
|
|
21
|
+
props: {
|
|
22
|
+
autoplay: {
|
|
23
|
+
type: "boolean",
|
|
24
|
+
description: "Whether to scroll automatically",
|
|
25
|
+
defaultValueHint: false
|
|
26
|
+
},
|
|
27
|
+
dotPosition: {
|
|
28
|
+
type: "choice",
|
|
29
|
+
options: ["top", "bottom", "left", "right"],
|
|
30
|
+
description: "The position of the dots",
|
|
31
|
+
defaultValueHint: "bottom"
|
|
32
|
+
},
|
|
33
|
+
dots: {
|
|
34
|
+
type: "boolean",
|
|
35
|
+
description: "Whether to show the dots at the bottom of the gallery",
|
|
36
|
+
defaultValueHint: true
|
|
37
|
+
},
|
|
38
|
+
effect: {
|
|
39
|
+
type: "choice",
|
|
40
|
+
options: ["scrollx", "fade"],
|
|
41
|
+
defaultValueHint: "scrollx"
|
|
42
|
+
},
|
|
43
|
+
children: {
|
|
44
|
+
type: "slot",
|
|
45
|
+
defaultValue: [
|
|
46
|
+
{
|
|
47
|
+
type: "vbox",
|
|
48
|
+
children: {
|
|
49
|
+
type: "text",
|
|
50
|
+
value: "1",
|
|
51
|
+
styles: contentStyle
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
type: "vbox",
|
|
56
|
+
children: {
|
|
57
|
+
type: "text",
|
|
58
|
+
value: "2",
|
|
59
|
+
styles: contentStyle
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
importPath: "antd/lib/carousel",
|
|
66
|
+
importName: "Carousel",
|
|
67
|
+
isDefaultExport: true
|
|
68
|
+
};
|
|
69
|
+
function registerCarousel(loader, customCarouselMeta) {
|
|
70
|
+
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent__default.default(...args);
|
|
71
|
+
doRegisterComponent(Carousel__default.default, customCarouselMeta != null ? customCarouselMeta : carouselMeta);
|
|
73
72
|
}
|
|
74
73
|
|
|
75
74
|
exports.carouselMeta = carouselMeta;
|