@plasmicpkgs/antd 0.0.106 → 2.0.2
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/antd.css +0 -27184
- package/dist/antd.esm.js +724 -720
- 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 +2353 -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 +13 -14
- package/dist/registerMenu.d.ts +14 -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 +14 -9
- package/skinny/customControls-f5378e2f.js +20 -0
- package/skinny/{customControls-8143c119.js.map → customControls-f5378e2f.js.map} +1 -1
- package/skinny/customControls.d.ts +17 -17
- package/skinny/package.json +2 -2
- package/skinny/registerButton.d.ts +5 -5
- package/skinny/registerButton.js +78 -94
- package/skinny/registerButton.js.map +1 -1
- package/skinny/registerCarousel.d.ts +5 -5
- package/skinny/registerCarousel.js +64 -80
- package/skinny/registerCarousel.js.map +1 -1
- package/skinny/registerCheckbox.d.ts +8 -8
- package/skinny/registerCheckbox.js +123 -140
- package/skinny/registerCheckbox.js.map +1 -1
- package/skinny/registerCollapse.d.ts +14 -14
- package/skinny/registerCollapse.js +172 -173
- package/skinny/registerCollapse.js.map +1 -1
- package/skinny/registerDropdown.d.ts +11 -11
- package/skinny/registerDropdown.js +172 -190
- package/skinny/registerDropdown.js.map +1 -1
- package/skinny/registerInput.d.ts +13 -14
- package/skinny/registerInput.js +360 -341
- package/skinny/registerInput.js.map +1 -1
- package/skinny/registerMenu.d.ts +14 -15
- package/skinny/registerMenu.js +274 -326
- package/skinny/registerMenu.js.map +1 -1
- package/skinny/registerOption.d.ts +8 -8
- package/skinny/registerOption.js +72 -95
- package/skinny/registerOption.js.map +1 -1
- package/skinny/registerRate.d.ts +5 -5
- package/skinny/registerSelect.d.ts +8 -8
- package/skinny/registerSelect.js +128 -144
- package/skinny/registerSelect.js.map +1 -1
- package/skinny/registerSlider.d.ts +19 -19
- package/skinny/registerSlider.js +130 -120
- package/skinny/registerSlider.js.map +1 -1
- package/skinny/registerSwitch.d.ts +5 -5
- package/skinny/registerSwitch.js +53 -69
- package/skinny/registerSwitch.js.map +1 -1
- package/skinny/registerTable.d.ts +30 -30
- package/skinny/registerTable.js +201 -204
- package/skinny/registerTable.js.map +1 -1
- package/skinny/registerTabs.d.ts +14 -13
- package/skinny/registerTabs.js +342 -330
- package/skinny/registerTabs.js.map +1 -1
- package/skinny/registerable.d.ts +4 -4
- package/dist/antd.cjs.development.js +0 -2325
- 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-8143c119.js +0 -27
- package/skinny/index.d.ts +0 -16
- package/skinny/tslib.es6-40998fef.js +0 -59
- package/skinny/tslib.es6-40998fef.js.map +0 -1
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/
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { Registerable } from "./registerable";
|
|
5
|
-
export declare const tabPaneMeta: ComponentMeta<TabPaneProps>;
|
|
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/es/tabs";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Registerable } from "./registerable";
|
|
5
|
+
export declare const tabPaneMeta: ComponentMeta<TabPaneProps>;
|
|
6
|
+
export declare const TabPane: React.FC<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": "
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Plasmic registration calls for antd components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"size-limit": [
|
|
13
13
|
{
|
|
14
|
-
"path": "dist/
|
|
14
|
+
"path": "dist/index.js",
|
|
15
15
|
"limit": "10 KB"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
@@ -20,30 +20,35 @@
|
|
|
20
20
|
}
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
|
-
"build": "
|
|
23
|
+
"build": "rollup -c rollup.config.js && yarn copy_css_files && ./node_modules/.bin/tsc --emitDeclarationOnly --declaration src/index.ts --skipLibCheck --jsx react --esModuleInterop --strict --outDir ./dist/ && cp ./dist/*.d.ts skinny/ && rm skinny/index.d.ts",
|
|
24
24
|
"start": "tsdx watch",
|
|
25
25
|
"test": "tsdx test --passWithNoTests",
|
|
26
26
|
"lint": "tsdx lint",
|
|
27
27
|
"prepare": "if-env PREPARE_NO_BUILD=true || yarn build",
|
|
28
|
-
"copy_css_files": "cp src/*.css dist/",
|
|
28
|
+
"copy_css_files": "mkdir -p dist/ && cp src/*.css dist/",
|
|
29
29
|
"size": "size-limit",
|
|
30
30
|
"analyze": "size-limit --why"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@plasmicapp/host": "1.0.
|
|
33
|
+
"@plasmicapp/host": "1.0.89",
|
|
34
34
|
"@size-limit/preset-small-lib": "^4.11.0",
|
|
35
35
|
"@types/node": "^14.0.26",
|
|
36
|
-
"antd": "^
|
|
36
|
+
"antd": "^5.0.0",
|
|
37
37
|
"react": "^17.0.2",
|
|
38
38
|
"react-dom": "^17.0.2",
|
|
39
|
+
"rollup-plugin-dts": "^5.0.0",
|
|
40
|
+
"rollup-plugin-esbuild": "^5.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": "^
|
|
47
|
+
"antd": "^5.0.0",
|
|
46
48
|
"react": ">=16.8.0"
|
|
47
49
|
},
|
|
48
|
-
"
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"antd": "^5.0.4"
|
|
52
|
+
},
|
|
53
|
+
"gitHead": "b98c225da7e2d5549337ef8cd260867dc00ee641"
|
|
49
54
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function traverseReactEltTree(children, callback) {
|
|
2
|
+
const rec = (elts) => {
|
|
3
|
+
(Array.isArray(elts) ? elts : [elts]).forEach((elt) => {
|
|
4
|
+
var _a;
|
|
5
|
+
if (elt) {
|
|
6
|
+
callback(elt);
|
|
7
|
+
if (elt.children) {
|
|
8
|
+
rec(elt.children);
|
|
9
|
+
}
|
|
10
|
+
if (((_a = elt.props) == null ? void 0 : _a.children) && elt.props.children !== elt.children) {
|
|
11
|
+
rec(elt.props.children);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
rec(children);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { traverseReactEltTree as t };
|
|
20
|
+
//# sourceMappingURL=customControls-f5378e2f.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customControls-
|
|
1
|
+
{"version":3,"file":"customControls-f5378e2f.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":"8BAkBE,UACA,UACA;AACA,QAAM,MAAM,CAAC,SAAuC;AAClD,IAAC,OAAM,QAAQ,IAAI,IAAI,OAAO,CAAC,IAAI,GAAG,QAAQ,CAAC,QAAQ;AAtB3D;AAuBM,UAAI,KAAK;AACP,iBAAS,GAAG;AACZ,YAAI,IAAI,UAAU;AAChB,cAAI,IAAI,QAAQ;AAAA;AAElB,YAAI,WAAI,UAAJ,mBAAW,aAAY,IAAI,MAAM,aAAa,IAAI,UAAU;AAC9D,cAAI,IAAI,MAAM,QAAQ;AAAA;AACxB;AACF,KACD;AAAA;AAEH,MAAI,QAAe;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 {};
|
package/skinny/package.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
{
|
|
2
|
-
"type": "
|
|
3
|
-
}
|
|
2
|
+
"type": "module"
|
|
3
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
import { ButtonProps } from "antd/
|
|
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/es/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
|
@@ -1,98 +1,82 @@
|
|
|
1
|
-
|
|
1
|
+
import registerComponent from '@plasmicapp/host/registerComponent';
|
|
2
|
+
import Button from 'antd/es/button';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
importPath: "antd/lib/button",
|
|
82
|
-
isDefaultExport: true,
|
|
83
|
-
importName: "Button",
|
|
84
|
-
};
|
|
85
|
-
function registerButton(loader, customButtonMeta) {
|
|
86
|
-
var doRegisterComponent = function () {
|
|
87
|
-
var args = [];
|
|
88
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
89
|
-
args[_i] = arguments[_i];
|
|
90
|
-
}
|
|
91
|
-
return loader ? loader.registerComponent.apply(loader, args) : registerComponent__default['default'].apply(void 0, args);
|
|
92
|
-
};
|
|
93
|
-
doRegisterComponent(Button__default['default'], customButtonMeta !== null && customButtonMeta !== void 0 ? customButtonMeta : buttonMeta);
|
|
4
|
+
const buttonMeta = {
|
|
5
|
+
name: "AntdButton",
|
|
6
|
+
displayName: "Antd Button",
|
|
7
|
+
props: {
|
|
8
|
+
type: {
|
|
9
|
+
type: "choice",
|
|
10
|
+
options: ["default", "primary", "ghost", "dashed", "link", "text"],
|
|
11
|
+
description: "Can be set to primary, ghost, dashed, link, text, default",
|
|
12
|
+
defaultValueHint: "default"
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
type: "choice",
|
|
16
|
+
options: ["small", "medium", "large"],
|
|
17
|
+
description: "Set the size of button",
|
|
18
|
+
defaultValueHint: "medium"
|
|
19
|
+
},
|
|
20
|
+
shape: {
|
|
21
|
+
type: "choice",
|
|
22
|
+
options: ["default", "circle", "round"],
|
|
23
|
+
description: "Can be set button shape",
|
|
24
|
+
defaultValueHint: "default"
|
|
25
|
+
},
|
|
26
|
+
disabled: {
|
|
27
|
+
type: "boolean",
|
|
28
|
+
description: "Disabled state of button",
|
|
29
|
+
defaultValueHint: false
|
|
30
|
+
},
|
|
31
|
+
ghost: {
|
|
32
|
+
type: "boolean",
|
|
33
|
+
description: "Make background transparent and invert text and border colors",
|
|
34
|
+
defaultValueHint: false
|
|
35
|
+
},
|
|
36
|
+
danger: {
|
|
37
|
+
type: "boolean",
|
|
38
|
+
description: "Set the danger status of button",
|
|
39
|
+
defaultValueHint: false
|
|
40
|
+
},
|
|
41
|
+
block: {
|
|
42
|
+
type: "boolean",
|
|
43
|
+
description: "Option to fit button width to its parent width",
|
|
44
|
+
defaultValueHint: false
|
|
45
|
+
},
|
|
46
|
+
loading: {
|
|
47
|
+
type: "boolean",
|
|
48
|
+
description: "Set the loading status of button",
|
|
49
|
+
defaultValueHint: false
|
|
50
|
+
},
|
|
51
|
+
href: {
|
|
52
|
+
type: "string",
|
|
53
|
+
description: "Redirect url of link button"
|
|
54
|
+
},
|
|
55
|
+
target: {
|
|
56
|
+
type: "choice",
|
|
57
|
+
options: ["_blank", "_self", "_parent", "_top"],
|
|
58
|
+
description: "Same as target attribute of a, works when href is specified",
|
|
59
|
+
hidden: (props) => !props.href,
|
|
60
|
+
defaultValueHint: "_self"
|
|
61
|
+
},
|
|
62
|
+
children: {
|
|
63
|
+
type: "slot",
|
|
64
|
+
defaultValue: [
|
|
65
|
+
{
|
|
66
|
+
type: "text",
|
|
67
|
+
value: "Button"
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
importPath: "antd/es/button",
|
|
73
|
+
isDefaultExport: true,
|
|
74
|
+
importName: "Button"
|
|
75
|
+
};
|
|
76
|
+
function registerButton(loader, customButtonMeta) {
|
|
77
|
+
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
|
|
78
|
+
doRegisterComponent(Button, customButtonMeta != null ? customButtonMeta : buttonMeta);
|
|
94
79
|
}
|
|
95
80
|
|
|
96
|
-
|
|
97
|
-
exports.registerButton = registerButton;
|
|
81
|
+
export { buttonMeta, registerButton };
|
|
98
82
|
//# sourceMappingURL=registerButton.js.map
|
|
@@ -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/
|
|
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/es/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/es/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":";;;MAKa,aAAyC;AAAA,EACpD,MAAM;AAAA,EACN,aAAa;AAAA,EACb,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS,CAAC,WAAW,WAAW,SAAS,UAAU,QAAQ,MAAM;AAAA,MACjE,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS,CAAC,SAAS,UAAU,OAAO;AAAA,MACpC,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS,CAAC,WAAW,UAAU,OAAO;AAAA,MACtC,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,aACE;AAAA,MACF,kBAAkB;AAAA;AACpB,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,aAAa;AAAA;AACf,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS,CAAC,UAAU,SAAS,WAAW,MAAM;AAAA,MAC9C,aACE;AAAA,MACF,QAAQ,CAAC,UAAU,CAAC,MAAM;AAAA,MAC1B,kBAAkB;AAAA;AACpB,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,cAAc;AAAA,QACZ;AAAA,UACE,MAAM;AAAA,UACN,OAAO;AAAA;AACT;AACF;AACF;AACF,EACA,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,YAAY;AACd;wBAGE,QACA,kBACA;AACA,QAAM,sBAAgD,IAAI,SACxD,SAAS,OAAO,kBAAkB,GAAG,IAAI,IAAI,kBAAkB,GAAG,IAAI;AACxE,sBAAoB,QAAQ,8CAAoB,UAAU;AAC5D;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
import { CarouselProps } from "antd/
|
|
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/es/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,84 +1,68 @@
|
|
|
1
|
-
|
|
1
|
+
import registerComponent from '@plasmicapp/host/registerComponent';
|
|
2
|
+
import Carousel from 'antd/es/carousel';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
type: "
|
|
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
|
-
importPath: "antd/lib/carousel",
|
|
68
|
-
importName: "Carousel",
|
|
69
|
-
isDefaultExport: true,
|
|
70
|
-
};
|
|
71
|
-
function registerCarousel(loader, customCarouselMeta) {
|
|
72
|
-
var doRegisterComponent = function () {
|
|
73
|
-
var args = [];
|
|
74
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
75
|
-
args[_i] = arguments[_i];
|
|
76
|
-
}
|
|
77
|
-
return loader ? loader.registerComponent.apply(loader, args) : registerComponent__default['default'].apply(void 0, args);
|
|
78
|
-
};
|
|
79
|
-
doRegisterComponent(Carousel__default['default'], customCarouselMeta !== null && customCarouselMeta !== void 0 ? customCarouselMeta : carouselMeta);
|
|
4
|
+
const contentStyle = {
|
|
5
|
+
height: "160px",
|
|
6
|
+
color: "#fff",
|
|
7
|
+
lineHeight: "160px",
|
|
8
|
+
textAlign: "center",
|
|
9
|
+
backgroundColor: "#364d79"
|
|
10
|
+
};
|
|
11
|
+
const carouselMeta = {
|
|
12
|
+
name: "AntdCarousel",
|
|
13
|
+
displayName: "Antd Carousel",
|
|
14
|
+
props: {
|
|
15
|
+
autoplay: {
|
|
16
|
+
type: "boolean",
|
|
17
|
+
description: "Whether to scroll automatically",
|
|
18
|
+
defaultValueHint: false
|
|
19
|
+
},
|
|
20
|
+
dotPosition: {
|
|
21
|
+
type: "choice",
|
|
22
|
+
options: ["top", "bottom", "left", "right"],
|
|
23
|
+
description: "The position of the dots",
|
|
24
|
+
defaultValueHint: "bottom"
|
|
25
|
+
},
|
|
26
|
+
dots: {
|
|
27
|
+
type: "boolean",
|
|
28
|
+
description: "Whether to show the dots at the bottom of the gallery",
|
|
29
|
+
defaultValueHint: true
|
|
30
|
+
},
|
|
31
|
+
effect: {
|
|
32
|
+
type: "choice",
|
|
33
|
+
options: ["scrollx", "fade"],
|
|
34
|
+
defaultValueHint: "scrollx"
|
|
35
|
+
},
|
|
36
|
+
children: {
|
|
37
|
+
type: "slot",
|
|
38
|
+
defaultValue: [
|
|
39
|
+
{
|
|
40
|
+
type: "vbox",
|
|
41
|
+
children: {
|
|
42
|
+
type: "text",
|
|
43
|
+
value: "1",
|
|
44
|
+
styles: contentStyle
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
type: "vbox",
|
|
49
|
+
children: {
|
|
50
|
+
type: "text",
|
|
51
|
+
value: "2",
|
|
52
|
+
styles: contentStyle
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
importPath: "antd/es/carousel",
|
|
59
|
+
importName: "Carousel",
|
|
60
|
+
isDefaultExport: true
|
|
61
|
+
};
|
|
62
|
+
function registerCarousel(loader, customCarouselMeta) {
|
|
63
|
+
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
|
|
64
|
+
doRegisterComponent(Carousel, customCarouselMeta != null ? customCarouselMeta : carouselMeta);
|
|
80
65
|
}
|
|
81
66
|
|
|
82
|
-
|
|
83
|
-
exports.registerCarousel = registerCarousel;
|
|
67
|
+
export { carouselMeta, registerCarousel };
|
|
84
68
|
//# sourceMappingURL=registerCarousel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerCarousel.js","sources":["../src/registerCarousel.ts"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport Carousel, { CarouselProps } from \"antd/
|
|
1
|
+
{"version":3,"file":"registerCarousel.js","sources":["../src/registerCarousel.ts"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport Carousel, { CarouselProps } from \"antd/es/carousel\";\nimport { CSSProperties } from \"react\";\nimport { Registerable } from \"./registerable\";\n\nconst contentStyle: CSSProperties = {\n height: \"160px\",\n color: \"#fff\",\n lineHeight: \"160px\",\n textAlign: \"center\",\n backgroundColor: \"#364d79\",\n};\n\nexport const carouselMeta: ComponentMeta<CarouselProps> = {\n name: \"AntdCarousel\",\n displayName: \"Antd Carousel\",\n props: {\n autoplay: {\n type: \"boolean\",\n description: \"Whether to scroll automatically\",\n defaultValueHint: false,\n },\n dotPosition: {\n type: \"choice\",\n options: [\"top\", \"bottom\", \"left\", \"right\"],\n description: \"The position of the dots\",\n defaultValueHint: \"bottom\",\n },\n dots: {\n type: \"boolean\",\n description: \"Whether to show the dots at the bottom of the gallery\",\n defaultValueHint: true,\n },\n effect: {\n type: \"choice\",\n options: [\"scrollx\", \"fade\"],\n defaultValueHint: \"scrollx\",\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"vbox\",\n children: {\n type: \"text\",\n value: \"1\",\n styles: contentStyle,\n },\n },\n {\n type: \"vbox\",\n children: {\n type: \"text\",\n value: \"2\",\n styles: contentStyle,\n },\n },\n ],\n },\n },\n importPath: \"antd/es/carousel\",\n importName: \"Carousel\",\n isDefaultExport: true,\n};\n\nexport function registerCarousel(\n loader?: Registerable,\n customCarouselMeta?: ComponentMeta<CarouselProps>\n) {\n const doRegisterComponent: typeof registerComponent = (...args) =>\n loader ? loader.registerComponent(...args) : registerComponent(...args);\n doRegisterComponent(Carousel, customCarouselMeta ?? carouselMeta);\n}\n"],"names":[],"mappings":";;;AAOA,MAAM,eAA8B;AAAA,EAClC,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,iBAAiB;AACnB;MAEa,eAA6C;AAAA,EACxD,MAAM;AAAA,EACN,aAAa;AAAA,EACb,OAAO;AAAA,IACL,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS,CAAC,OAAO,UAAU,QAAQ,OAAO;AAAA,MAC1C,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS,CAAC,WAAW,MAAM;AAAA,MAC3B,kBAAkB;AAAA;AACpB,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,cAAc;AAAA,QACZ;AAAA,UACE,MAAM;AAAA,UACN,UAAU;AAAA,YACR,MAAM;AAAA,YACN,OAAO;AAAA,YACP,QAAQ;AAAA;AACV;AACF,QACA;AAAA,UACE,MAAM;AAAA,UACN,UAAU;AAAA,YACR,MAAM;AAAA,YACN,OAAO;AAAA,YACP,QAAQ;AAAA;AACV;AACF;AACF;AACF;AACF,EACA,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,iBAAiB;AACnB;0BAGE,QACA,oBACA;AACA,QAAM,sBAAgD,IAAI,SACxD,SAAS,OAAO,kBAAkB,GAAG,IAAI,IAAI,kBAAkB,GAAG,IAAI;AACxE,sBAAoB,UAAU,kDAAsB,YAAY;AAClE;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
import { CheckboxProps } from "antd/
|
|
3
|
-
import { CheckboxGroupProps } from "antd/
|
|
4
|
-
import { Registerable } from "./registerable";
|
|
5
|
-
export declare const checkboxMeta: ComponentMeta<CheckboxProps>;
|
|
6
|
-
export declare function registerCheckbox(loader?: Registerable, customCheckboxMeta?: ComponentMeta<CheckboxProps>): void;
|
|
7
|
-
export declare const checkboxGroupMeta: ComponentMeta<CheckboxGroupProps>;
|
|
8
|
-
export declare function registerCheckboxGroup(loader?: Registerable, customCheckboxGroupMeta?: ComponentMeta<CheckboxGroupProps>): void;
|
|
1
|
+
import { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
+
import { CheckboxProps } from "antd/es/checkbox/Checkbox";
|
|
3
|
+
import { CheckboxGroupProps } from "antd/es/checkbox/Group";
|
|
4
|
+
import { Registerable } from "./registerable";
|
|
5
|
+
export declare const checkboxMeta: ComponentMeta<CheckboxProps>;
|
|
6
|
+
export declare function registerCheckbox(loader?: Registerable, customCheckboxMeta?: ComponentMeta<CheckboxProps>): void;
|
|
7
|
+
export declare const checkboxGroupMeta: ComponentMeta<CheckboxGroupProps>;
|
|
8
|
+
export declare function registerCheckboxGroup(loader?: Registerable, customCheckboxGroupMeta?: ComponentMeta<CheckboxGroupProps>): void;
|