@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.
Files changed (79) hide show
  1. package/dist/.tsbuildinfo +1 -0
  2. package/dist/antd.esm.js +703 -616
  3. package/dist/antd.esm.js.map +1 -1
  4. package/dist/customControls.d.ts +17 -17
  5. package/dist/index.d.ts +16 -16
  6. package/dist/index.js +2352 -5
  7. package/dist/index.js.map +1 -0
  8. package/dist/registerButton.d.ts +5 -5
  9. package/dist/registerCarousel.d.ts +5 -5
  10. package/dist/registerCheckbox.d.ts +8 -8
  11. package/dist/registerCollapse.d.ts +14 -14
  12. package/dist/registerDropdown.d.ts +11 -11
  13. package/dist/registerInput.d.ts +14 -14
  14. package/dist/registerMenu.d.ts +15 -15
  15. package/dist/registerOption.d.ts +8 -8
  16. package/dist/registerRate.d.ts +5 -5
  17. package/dist/registerSelect.d.ts +8 -8
  18. package/dist/registerSlider.d.ts +19 -19
  19. package/dist/registerSwitch.d.ts +5 -5
  20. package/dist/registerTable.d.ts +30 -30
  21. package/dist/registerTabs.d.ts +14 -13
  22. package/dist/registerable.d.ts +4 -4
  23. package/package.json +10 -9
  24. package/skinny/customControls-fb0b7e5f.js +22 -0
  25. package/skinny/{customControls-ff79afdf.js.map → customControls-fb0b7e5f.js.map} +1 -1
  26. package/skinny/customControls.d.ts +17 -17
  27. package/skinny/registerButton.d.ts +5 -5
  28. package/skinny/registerButton.js +80 -81
  29. package/skinny/registerButton.js.map +1 -1
  30. package/skinny/registerCarousel.d.ts +5 -5
  31. package/skinny/registerCarousel.js +66 -67
  32. package/skinny/registerCarousel.js.map +1 -1
  33. package/skinny/registerCheckbox.d.ts +8 -8
  34. package/skinny/registerCheckbox.js +125 -121
  35. package/skinny/registerCheckbox.js.map +1 -1
  36. package/skinny/registerCollapse.d.ts +14 -14
  37. package/skinny/registerCollapse.js +174 -153
  38. package/skinny/registerCollapse.js.map +1 -1
  39. package/skinny/registerDropdown.d.ts +11 -11
  40. package/skinny/registerDropdown.js +175 -171
  41. package/skinny/registerDropdown.js.map +1 -1
  42. package/skinny/registerInput.d.ts +14 -14
  43. package/skinny/registerInput.js +362 -312
  44. package/skinny/registerInput.js.map +1 -1
  45. package/skinny/registerMenu.d.ts +15 -15
  46. package/skinny/registerMenu.js +275 -298
  47. package/skinny/registerMenu.js.map +1 -1
  48. package/skinny/registerOption.d.ts +8 -8
  49. package/skinny/registerOption.js +73 -81
  50. package/skinny/registerOption.js.map +1 -1
  51. package/skinny/registerRate.d.ts +5 -5
  52. package/skinny/registerRate.js +66 -0
  53. package/skinny/registerRate.js.map +1 -0
  54. package/skinny/registerSelect.d.ts +8 -8
  55. package/skinny/registerSelect.js +129 -130
  56. package/skinny/registerSelect.js.map +1 -1
  57. package/skinny/registerSlider.d.ts +19 -19
  58. package/skinny/registerSlider.js +132 -104
  59. package/skinny/registerSlider.js.map +1 -1
  60. package/skinny/registerSwitch.d.ts +5 -5
  61. package/skinny/registerSwitch.js +55 -56
  62. package/skinny/registerSwitch.js.map +1 -1
  63. package/skinny/registerTable.d.ts +30 -30
  64. package/skinny/registerTable.js +202 -183
  65. package/skinny/registerTable.js.map +1 -1
  66. package/skinny/registerTabs.d.ts +14 -13
  67. package/skinny/registerTabs.js +344 -311
  68. package/skinny/registerTabs.js.map +1 -1
  69. package/skinny/registerable.d.ts +4 -4
  70. package/skinny/registerable.js +3 -0
  71. package/skinny/registerable.js.map +1 -0
  72. package/dist/antd.cjs.development.js +0 -2243
  73. package/dist/antd.cjs.development.js.map +0 -1
  74. package/dist/antd.cjs.production.min.js +0 -2
  75. package/dist/antd.cjs.production.min.js.map +0 -1
  76. package/skinny/customControls-ff79afdf.js +0 -27
  77. package/skinny/index.d.ts +0 -16
  78. package/skinny/tslib.es6-b92c4a81.js +0 -59
  79. package/skinny/tslib.es6-b92c4a81.js.map +0 -1
@@ -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 {};
@@ -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 tabPaneMeta: ComponentMeta<TabPaneProps>;
6
- export declare function registerTabPane(loader?: Registerable, customTabPaneMeta?: ComponentMeta<TabPaneProps>): void;
7
- export declare type TabsProps = Omit<AntdTabsProps, "tabBarExtraContent"> & {
8
- leftTabBarExtraContent?: React.ReactNode;
9
- rightTabBarExtraContent?: React.ReactNode;
10
- };
11
- export declare function Tabs(props: TabsProps): JSX.Element;
12
- export declare const tabsMeta: ComponentMeta<TabsProps>;
13
- export declare function registerTabs(loader?: Registerable, customTabsMeta?: ComponentMeta<TabsProps>): void;
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;
@@ -1,4 +1,4 @@
1
- import registerComponent from "@plasmicapp/host/registerComponent";
2
- export declare type Registerable = {
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.19",
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": "tsdx build && yarn copy_css_files && rollup -c rollup.config.mjs",
24
- "start": "tsdx watch",
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": "^3.9.7"
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": "edea7f8c94cdfba370fad4286fdd07e3845571b8"
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-ff79afdf.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":";;AAYA;;;;AAIG;AACa,SAAA,oBAAoB,CAClC,QAAyB,EACzB,QAAiC,EAAA;IAEjC,IAAM,GAAG,GAAG,UAAC,IAAkC,EAAA;QAC7C,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,UAAC,GAAG,EAAA;;AAChD,YAAA,IAAI,GAAG,EAAE;gBACP,QAAQ,CAAC,GAAG,CAAC,CAAC;gBACd,IAAI,GAAG,CAAC,QAAQ,EAAE;AAChB,oBAAA,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACnB,iBAAA;AACD,gBAAA,IAAI,OAAA,GAAG,CAAC,KAAK,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAE,QAAQ,KAAI,GAAG,CAAC,KAAK,CAAC,QAAQ,KAAK,GAAG,CAAC,QAAQ,EAAE;AAC9D,oBAAA,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AACzB,iBAAA;AACF,aAAA;AACH,SAAC,CAAC,CAAC;AACL,KAAC,CAAC;IACF,GAAG,CAAC,QAAe,CAAC,CAAC;AACvB;;;;"}
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
- declare 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
+ 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;
@@ -3,87 +3,86 @@
3
3
  var registerComponent = require('@plasmicapp/host/registerComponent');
4
4
  var Button = require('antd/lib/button');
5
5
 
6
- var buttonMeta = {
7
- name: "AntdButton",
8
- displayName: "Antd Button",
9
- props: {
10
- type: {
11
- type: "choice",
12
- options: ["default", "primary", "ghost", "dashed", "link", "text"],
13
- description: "Can be set to primary, ghost, dashed, link, text, default",
14
- defaultValueHint: "default",
15
- },
16
- size: {
17
- type: "choice",
18
- options: ["small", "medium", "large"],
19
- description: "Set the size of button",
20
- defaultValueHint: "medium",
21
- },
22
- shape: {
23
- type: "choice",
24
- options: ["default", "circle", "round"],
25
- description: "Can be set button shape",
26
- defaultValueHint: "default",
27
- },
28
- disabled: {
29
- type: "boolean",
30
- description: "Disabled state of button",
31
- defaultValueHint: false,
32
- },
33
- ghost: {
34
- type: "boolean",
35
- description: "Make background transparent and invert text and border colors",
36
- defaultValueHint: false,
37
- },
38
- danger: {
39
- type: "boolean",
40
- description: "Set the danger status of button",
41
- defaultValueHint: false,
42
- },
43
- block: {
44
- type: "boolean",
45
- description: "Option to fit button width to its parent width",
46
- defaultValueHint: false,
47
- },
48
- loading: {
49
- type: "boolean",
50
- description: "Set the loading status of button",
51
- defaultValueHint: false,
52
- },
53
- href: {
54
- type: "string",
55
- description: "Redirect url of link button",
56
- },
57
- target: {
58
- type: "choice",
59
- options: ["_blank", "_self", "_parent", "_top"],
60
- description: "Same as target attribute of a, works when href is specified",
61
- hidden: function (props) { return !props.href; },
62
- defaultValueHint: "_self",
63
- },
64
- children: {
65
- type: "slot",
66
- defaultValue: [
67
- {
68
- type: "text",
69
- value: "Button",
70
- },
71
- ],
72
- },
73
- },
74
- importPath: "antd/lib/button",
75
- isDefaultExport: true,
76
- importName: "Button",
77
- };
78
- function registerButton(loader, customButtonMeta) {
79
- var doRegisterComponent = function () {
80
- var args = [];
81
- for (var _i = 0; _i < arguments.length; _i++) {
82
- args[_i] = arguments[_i];
83
- }
84
- return loader ? loader.registerComponent.apply(loader, args) : registerComponent.apply(void 0, args);
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":";;;;;AAKa,IAAA,UAAU,GAA+B;AACpD,IAAA,IAAI,EAAE,YAAY;AAClB,IAAA,WAAW,EAAE,aAAa;AAC1B,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE;AACJ,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;AAClE,YAAA,WAAW,EAA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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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pB;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
- var contentStyle = {
7
- height: "160px",
8
- color: "#fff",
9
- lineHeight: "160px",
10
- textAlign: "center",
11
- backgroundColor: "#364d79",
12
- };
13
- var carouselMeta = {
14
- name: "AntdCarousel",
15
- displayName: "Antd Carousel",
16
- props: {
17
- autoplay: {
18
- type: "boolean",
19
- description: "Whether to scroll automatically",
20
- defaultValueHint: false,
21
- },
22
- dotPosition: {
23
- type: "choice",
24
- options: ["top", "bottom", "left", "right"],
25
- description: "The position of the dots",
26
- defaultValueHint: "bottom",
27
- },
28
- dots: {
29
- type: "boolean",
30
- description: "Whether to show the dots at the bottom of the gallery",
31
- defaultValueHint: true,
32
- },
33
- effect: {
34
- type: "choice",
35
- options: ["scrollx", "fade"],
36
- defaultValueHint: "scrollx",
37
- },
38
- children: {
39
- type: "slot",
40
- defaultValue: [
41
- {
42
- type: "vbox",
43
- children: {
44
- type: "text",
45
- value: "1",
46
- styles: contentStyle,
47
- },
48
- },
49
- {
50
- type: "vbox",
51
- children: {
52
- type: "text",
53
- value: "2",
54
- styles: contentStyle,
55
- },
56
- },
57
- ],
58
- },
59
- },
60
- importPath: "antd/lib/carousel",
61
- importName: "Carousel",
62
- isDefaultExport: true,
63
- };
64
- function registerCarousel(loader, customCarouselMeta) {
65
- var doRegisterComponent = function () {
66
- var args = [];
67
- for (var _i = 0; _i < arguments.length; _i++) {
68
- args[_i] = arguments[_i];
69
- }
70
- return loader ? loader.registerComponent.apply(loader, args) : registerComponent.apply(void 0, args);
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;