@plasmicpkgs/antd 0.0.75 → 0.0.78

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 (51) hide show
  1. package/dist/antd.cjs.development.js +5 -5
  2. package/dist/antd.cjs.development.js.map +1 -1
  3. package/dist/antd.cjs.production.min.js +1 -1
  4. package/dist/antd.cjs.production.min.js.map +1 -1
  5. package/dist/antd.esm.js +5 -5
  6. package/dist/antd.esm.js.map +1 -1
  7. package/package.json +7 -6
  8. package/skinny/customControls-8143c119.js +27 -0
  9. package/skinny/customControls-8143c119.js.map +1 -0
  10. package/skinny/customControls.d.ts +17 -0
  11. package/skinny/index.d.ts +15 -0
  12. package/skinny/package.json +3 -0
  13. package/skinny/registerButton.d.ts +5 -0
  14. package/skinny/registerButton.js +98 -0
  15. package/skinny/registerButton.js.map +1 -0
  16. package/skinny/registerCarousel.d.ts +5 -0
  17. package/skinny/registerCarousel.js +84 -0
  18. package/skinny/registerCarousel.js.map +1 -0
  19. package/skinny/registerCheckbox.d.ts +8 -0
  20. package/skinny/registerCheckbox.js +144 -0
  21. package/skinny/registerCheckbox.js.map +1 -0
  22. package/skinny/registerCollapse.d.ts +14 -0
  23. package/skinny/registerCollapse.js +177 -0
  24. package/skinny/registerCollapse.js.map +1 -0
  25. package/skinny/registerDropdown.d.ts +11 -0
  26. package/skinny/registerDropdown.js +194 -0
  27. package/skinny/registerDropdown.js.map +1 -0
  28. package/skinny/registerInput.d.ts +14 -0
  29. package/skinny/registerInput.js +345 -0
  30. package/skinny/registerInput.js.map +1 -0
  31. package/skinny/registerMenu.d.ts +15 -0
  32. package/skinny/registerMenu.js +330 -0
  33. package/skinny/registerMenu.js.map +1 -0
  34. package/skinny/registerOption.d.ts +8 -0
  35. package/skinny/registerOption.js +99 -0
  36. package/skinny/registerOption.js.map +1 -0
  37. package/skinny/registerSelect.d.ts +8 -0
  38. package/skinny/registerSelect.js +148 -0
  39. package/skinny/registerSelect.js.map +1 -0
  40. package/skinny/registerSlider.d.ts +19 -0
  41. package/skinny/registerSlider.js +124 -0
  42. package/skinny/registerSlider.js.map +1 -0
  43. package/skinny/registerSwitch.d.ts +5 -0
  44. package/skinny/registerSwitch.js +73 -0
  45. package/skinny/registerSwitch.js.map +1 -0
  46. package/skinny/registerTabs.d.ts +13 -0
  47. package/skinny/registerTabs.js +259 -0
  48. package/skinny/registerTabs.js.map +1 -0
  49. package/skinny/registerable.d.ts +4 -0
  50. package/skinny/tslib.es6-40998fef.js +59 -0
  51. package/skinny/tslib.es6-40998fef.js.map +1 -0
@@ -0,0 +1,177 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib_es6 = require('./tslib.es6-40998fef.js');
6
+ var registerComponent = require('@plasmicapp/host/registerComponent');
7
+ var AntdCollapse = require('antd/lib/collapse/Collapse');
8
+ var CollapsePanel = require('antd/lib/collapse/CollapsePanel');
9
+ var React = require('react');
10
+ var customControls = require('./customControls-8143c119.js');
11
+
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ var registerComponent__default = /*#__PURE__*/_interopDefaultLegacy(registerComponent);
15
+ var AntdCollapse__default = /*#__PURE__*/_interopDefaultLegacy(AntdCollapse);
16
+ var CollapsePanel__default = /*#__PURE__*/_interopDefaultLegacy(CollapsePanel);
17
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
18
+
19
+ var collapstePanelMeta = {
20
+ name: "AntdCollapsePanel",
21
+ displayName: "Antd Collapse Panel",
22
+ props: {
23
+ collapsible: {
24
+ type: "choice",
25
+ options: ["header", "disabled"],
26
+ description: "Specify whether the panel be collapsible or the trigger area of collapsible",
27
+ },
28
+ forceRender: {
29
+ type: "boolean",
30
+ description: "Forced render of content on panel, instead of lazy rending after clicking on header",
31
+ defaultValueHint: false,
32
+ },
33
+ header: {
34
+ type: "slot",
35
+ defaultValue: [
36
+ {
37
+ type: "text",
38
+ value: "Header",
39
+ },
40
+ ],
41
+ },
42
+ key: {
43
+ type: "string",
44
+ description: "Unique key identifying the panel from among its siblings",
45
+ },
46
+ showArrow: {
47
+ type: "boolean",
48
+ description: "If false, panel will not show arrow icon",
49
+ defaultValueHint: true,
50
+ },
51
+ extra: {
52
+ type: "slot",
53
+ hidePlaceholder: true,
54
+ },
55
+ children: {
56
+ type: "slot",
57
+ defaultValue: [
58
+ {
59
+ type: "text",
60
+ value: "Insert text here",
61
+ },
62
+ ],
63
+ },
64
+ },
65
+ importPath: "antd/lib/collapse/CollapsePanel",
66
+ importName: "CollapsePanel",
67
+ parentComponentName: "AntdCollapse",
68
+ isDefaultExport: true,
69
+ };
70
+ function registerCollapsePanel(loader, customCollapsePanelMeta) {
71
+ var doRegisterComponent = function () {
72
+ var args = [];
73
+ for (var _i = 0; _i < arguments.length; _i++) {
74
+ args[_i] = arguments[_i];
75
+ }
76
+ return loader ? loader.registerComponent.apply(loader, args) : registerComponent__default['default'].apply(void 0, args);
77
+ };
78
+ doRegisterComponent(CollapsePanel__default['default'], customCollapsePanelMeta !== null && customCollapsePanelMeta !== void 0 ? customCollapsePanelMeta : collapstePanelMeta);
79
+ }
80
+ var collapsteMeta = {
81
+ name: "AntdCollapse",
82
+ displayName: "Antd Collapse",
83
+ props: {
84
+ accordion: {
85
+ type: "boolean",
86
+ description: "If true, Collapse renders as Accordion",
87
+ defaultValueHint: false,
88
+ },
89
+ activeKey: {
90
+ type: "choice",
91
+ editOnly: true,
92
+ uncontrolledProp: "defaultActiveKey",
93
+ description: "Key of the active panel",
94
+ multiSelect: true,
95
+ options: function (componentProps) {
96
+ var options = new Set();
97
+ // `children` is not defined in the Collapse props
98
+ customControls.traverseReactEltTree(componentProps.children, function (elt) {
99
+ if ((elt === null || elt === void 0 ? void 0 : elt.type) === CollapsePanel__default['default'] && typeof (elt === null || elt === void 0 ? void 0 : elt.key) === "string") {
100
+ options.add(elt.key);
101
+ }
102
+ });
103
+ return Array.from(options.keys());
104
+ },
105
+ },
106
+ bordered: {
107
+ type: "boolean",
108
+ description: "Toggles rendering of the border around the collapse block",
109
+ defaultValueHint: true,
110
+ },
111
+ collapsible: {
112
+ type: "choice",
113
+ options: ["header", "disabled"],
114
+ description: "Specify whether the panels of children be collapsible or the trigger area of collapsible",
115
+ },
116
+ expandIconPosition: {
117
+ type: "choice",
118
+ options: ["left", "right"],
119
+ description: "Set expand icon position",
120
+ defaultValueHint: "left",
121
+ },
122
+ ghost: {
123
+ type: "boolean",
124
+ description: "Make the collapse borderless and its background transparent",
125
+ defaultValueHint: false,
126
+ },
127
+ children: {
128
+ type: "slot",
129
+ allowedComponents: ["AntdCollapsePanel"],
130
+ defaultValue: [
131
+ {
132
+ type: "component",
133
+ name: "AntdCollapsePanel",
134
+ props: {
135
+ key: "1",
136
+ },
137
+ },
138
+ ],
139
+ },
140
+ openIcon: {
141
+ type: "slot",
142
+ hidePlaceholder: true,
143
+ },
144
+ closeIcon: {
145
+ type: "slot",
146
+ hidePlaceholder: true,
147
+ },
148
+ },
149
+ importPath: "@plasmicpkgs/antd/skinny/registerCollapse",
150
+ importName: "Collapse",
151
+ };
152
+ function Collapse(props) {
153
+ var openIcon = props.openIcon, closeIcon = props.closeIcon, rest = tslib_es6.__rest(props, ["openIcon", "closeIcon"]);
154
+ return (React__default['default'].createElement(AntdCollapse__default['default'], tslib_es6.__assign({}, rest, { expandIcon: openIcon || closeIcon
155
+ ? function (_a) {
156
+ var isActive = _a.isActive;
157
+ return (isActive ? openIcon : closeIcon);
158
+ }
159
+ : undefined })));
160
+ }
161
+ function registerCollapse(loader, customCollapseMeta) {
162
+ var doRegisterComponent = function () {
163
+ var args = [];
164
+ for (var _i = 0; _i < arguments.length; _i++) {
165
+ args[_i] = arguments[_i];
166
+ }
167
+ return loader ? loader.registerComponent.apply(loader, args) : registerComponent__default['default'].apply(void 0, args);
168
+ };
169
+ doRegisterComponent(Collapse, customCollapseMeta !== null && customCollapseMeta !== void 0 ? customCollapseMeta : collapsteMeta);
170
+ }
171
+
172
+ exports.Collapse = Collapse;
173
+ exports.collapsteMeta = collapsteMeta;
174
+ exports.collapstePanelMeta = collapstePanelMeta;
175
+ exports.registerCollapse = registerCollapse;
176
+ exports.registerCollapsePanel = registerCollapsePanel;
177
+ //# sourceMappingURL=registerCollapse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerCollapse.js","sources":["../src/registerCollapse.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport {\n CollapsePanelProps,\n CollapseProps as AntdCollapseProps,\n} from \"antd/lib/collapse\";\nimport AntdCollapse from \"antd/lib/collapse/Collapse\";\nimport CollapsePanel from \"antd/lib/collapse/CollapsePanel\";\nimport React from \"react\";\nimport { traverseReactEltTree } from \"./customControls\";\nimport { Registerable } from \"./registerable\";\n\nexport const collapstePanelMeta: ComponentMeta<CollapsePanelProps> = {\n name: \"AntdCollapsePanel\",\n displayName: \"Antd Collapse Panel\",\n props: {\n collapsible: {\n type: \"choice\",\n options: [\"header\", \"disabled\"],\n description:\n \"Specify whether the panel be collapsible or the trigger area of collapsible\",\n },\n forceRender: {\n type: \"boolean\",\n description:\n \"Forced render of content on panel, instead of lazy rending after clicking on header\",\n defaultValueHint: false,\n },\n header: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"text\",\n value: \"Header\",\n },\n ],\n },\n key: {\n type: \"string\",\n description: \"Unique key identifying the panel from among its siblings\",\n },\n showArrow: {\n type: \"boolean\",\n description: \"If false, panel will not show arrow icon\",\n defaultValueHint: true,\n },\n extra: {\n type: \"slot\",\n hidePlaceholder: true,\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"text\",\n value: \"Insert text here\",\n },\n ],\n },\n },\n importPath: \"antd/lib/collapse/CollapsePanel\",\n importName: \"CollapsePanel\",\n parentComponentName: \"AntdCollapse\",\n isDefaultExport: true,\n};\n\nexport function registerCollapsePanel(\n loader?: Registerable,\n customCollapsePanelMeta?: ComponentMeta<CollapsePanelProps>\n) {\n const doRegisterComponent: typeof registerComponent = (...args) =>\n loader ? loader.registerComponent(...args) : registerComponent(...args);\n doRegisterComponent(\n CollapsePanel,\n customCollapsePanelMeta ?? collapstePanelMeta\n );\n}\n\ntype CollapseProps = {\n openIcon?: React.ReactNode;\n closeIcon?: React.ReactNode;\n} & AntdCollapseProps;\n\nexport const collapsteMeta: ComponentMeta<CollapseProps> = {\n name: \"AntdCollapse\",\n displayName: \"Antd Collapse\",\n props: {\n accordion: {\n type: \"boolean\",\n description: \"If true, Collapse renders as Accordion\",\n defaultValueHint: false,\n },\n activeKey: {\n type: \"choice\",\n editOnly: true,\n uncontrolledProp: \"defaultActiveKey\",\n description: \"Key of the active panel\",\n multiSelect: true,\n options: (componentProps) => {\n const options = new Set<string>();\n // `children` is not defined in the Collapse props\n traverseReactEltTree((componentProps as any).children, (elt) => {\n if (elt?.type === CollapsePanel && typeof elt?.key === \"string\") {\n options.add(elt.key);\n }\n });\n return Array.from(options.keys());\n },\n },\n bordered: {\n type: \"boolean\",\n description: \"Toggles rendering of the border around the collapse block\",\n defaultValueHint: true,\n },\n collapsible: {\n type: \"choice\",\n options: [\"header\", \"disabled\"],\n description:\n \"Specify whether the panels of children be collapsible or the trigger area of collapsible\",\n },\n expandIconPosition: {\n type: \"choice\",\n options: [\"left\", \"right\"],\n description: \"Set expand icon position\",\n defaultValueHint: \"left\",\n },\n ghost: {\n type: \"boolean\",\n description:\n \"Make the collapse borderless and its background transparent\",\n defaultValueHint: false,\n },\n children: {\n type: \"slot\",\n allowedComponents: [\"AntdCollapsePanel\"],\n defaultValue: [\n {\n type: \"component\",\n name: \"AntdCollapsePanel\",\n props: {\n key: \"1\",\n },\n },\n ],\n },\n openIcon: {\n type: \"slot\",\n hidePlaceholder: true,\n },\n closeIcon: {\n type: \"slot\",\n hidePlaceholder: true,\n },\n },\n importPath: \"@plasmicpkgs/antd/skinny/registerCollapse\",\n importName: \"Collapse\",\n};\n\nexport function Collapse(props: CollapseProps) {\n const { openIcon, closeIcon, ...rest } = props;\n return (\n <AntdCollapse\n {...rest}\n expandIcon={\n openIcon || closeIcon\n ? ({ isActive }) => (isActive ? openIcon : closeIcon)\n : undefined\n }\n />\n );\n}\n\nexport function registerCollapse(\n loader?: Registerable,\n customCollapseMeta?: ComponentMeta<CollapseProps>\n) {\n const doRegisterComponent: typeof registerComponent = (...args) =>\n loader ? loader.registerComponent(...args) : registerComponent(...args);\n doRegisterComponent(Collapse, customCollapseMeta ?? collapsteMeta);\n}\n"],"names":["registerComponent","CollapsePanel","traverseReactEltTree","React","AntdCollapse"],"mappings":";;;;;;;;;;;;;;;;;;IAaa,kBAAkB,GAAsC;IACnE,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,qBAAqB;IAClC,KAAK,EAAE;QACL,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC;YAC/B,WAAW,EACT,6EAA6E;SAChF;QACD,WAAW,EAAE;YACX,IAAI,EAAE,SAAS;YACf,WAAW,EACT,qFAAqF;YACvF,gBAAgB,EAAE,KAAK;SACxB;QACD,MAAM,EAAE;YACN,IAAI,EAAE,MAAM;YACZ,YAAY,EAAE;gBACZ;oBACE,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,QAAQ;iBAChB;aACF;SACF;QACD,GAAG,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,0DAA0D;SACxE;QACD,SAAS,EAAE;YACT,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,0CAA0C;YACvD,gBAAgB,EAAE,IAAI;SACvB;QACD,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,eAAe,EAAE,IAAI;SACtB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,MAAM;YACZ,YAAY,EAAE;gBACZ;oBACE,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,kBAAkB;iBAC1B;aACF;SACF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QAAQ,GAAG,SAAS;aAAC;cACnD,SAAS,IAEf,EACF;AACJ,CAAC;SAEe,gBAAgB,CAC9B,MAAqB,EACrB,kBAAiD;IAEjD,IAAM,mBAAmB,GAA6B;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QAC5D,OAAA,MAAM,GAAG,MAAM,CAAC,iBAAiB,OAAxB,MAAM,EAAsB,IAAI,IAAIJ,qCAAiB,eAAI,IAAI,CAAC;KAAA,CAAC;IAC1E,mBAAmB,CAAC,QAAQ,EAAE,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,aAAa,CAAC,CAAC;AACrE;;;;;;;;"}
@@ -0,0 +1,11 @@
1
+ import { ComponentMeta } from "@plasmicapp/host/registerComponent";
2
+ import { DropdownButtonProps, DropDownProps } from "antd/lib/dropdown";
3
+ import React from "react";
4
+ import { Registerable } from "./registerable";
5
+ export declare class Dropdown extends React.Component<DropDownProps> {
6
+ render(): JSX.Element;
7
+ }
8
+ export declare const dropdownMeta: ComponentMeta<DropDownProps>;
9
+ export declare function registerDropdown(loader?: Registerable, customDropdownMeta?: ComponentMeta<DropDownProps>): void;
10
+ export declare const dropdownButtonMeta: ComponentMeta<DropdownButtonProps>;
11
+ export declare function registerDropdownButton(loader?: Registerable, customDropdownButtonMeta?: ComponentMeta<DropDownProps>): void;
@@ -0,0 +1,194 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib_es6 = require('./tslib.es6-40998fef.js');
6
+ var registerComponent = require('@plasmicapp/host/registerComponent');
7
+ var AntdDropdown = require('antd/lib/dropdown');
8
+ var DropdownButton = require('antd/lib/dropdown/dropdown-button');
9
+ var React = require('react');
10
+
11
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
+
13
+ var registerComponent__default = /*#__PURE__*/_interopDefaultLegacy(registerComponent);
14
+ var AntdDropdown__default = /*#__PURE__*/_interopDefaultLegacy(AntdDropdown);
15
+ var DropdownButton__default = /*#__PURE__*/_interopDefaultLegacy(DropdownButton);
16
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
17
+
18
+ var Dropdown = /** @class */ (function (_super) {
19
+ tslib_es6.__extends(Dropdown, _super);
20
+ function Dropdown() {
21
+ return _super !== null && _super.apply(this, arguments) || this;
22
+ }
23
+ Dropdown.prototype.render = function () {
24
+ var finalProps = tslib_es6.__assign({}, this.props);
25
+ finalProps.children =
26
+ typeof this.props.children === "string" ? (React__default['default'].createElement("div", null, this.props.children)) : (this.props.children);
27
+ return React__default['default'].createElement(AntdDropdown__default['default'], tslib_es6.__assign({}, finalProps));
28
+ };
29
+ return Dropdown;
30
+ }(React__default['default'].Component));
31
+ var dropdownMeta = {
32
+ name: "AntdDropdown",
33
+ displayName: "Antd Dropdown",
34
+ props: {
35
+ arrow: {
36
+ type: "boolean",
37
+ description: "Whether the dropdown arrow should be visible",
38
+ defaultValueHint: false,
39
+ },
40
+ disabled: {
41
+ type: "boolean",
42
+ description: "Whether the dropdown menu is disabled",
43
+ defaultValueHint: false,
44
+ },
45
+ overlay: {
46
+ type: "slot",
47
+ allowedComponents: ["AntdMenu"],
48
+ defaultValue: [
49
+ {
50
+ type: "component",
51
+ name: "AntdMenu",
52
+ },
53
+ ],
54
+ },
55
+ placement: {
56
+ type: "choice",
57
+ options: [
58
+ "bottomLeft",
59
+ "bottomCenter",
60
+ "bottomRight",
61
+ "topLeft",
62
+ "topCenter",
63
+ "topRight",
64
+ ],
65
+ description: "Placement of popup menu",
66
+ defaultValueHint: "bottomLeft",
67
+ },
68
+ trigger: {
69
+ type: "choice",
70
+ options: ["click", "hover", "contextMenu"],
71
+ description: "The trigger mode which executes the dropdown action",
72
+ defaultValueHint: "hover",
73
+ },
74
+ visible: {
75
+ type: "boolean",
76
+ description: "Toggle visibility of dropdown menu in Plasmic Editor",
77
+ editOnly: true,
78
+ defaultValueHint: false,
79
+ },
80
+ children: {
81
+ type: "slot",
82
+ defaultValue: [
83
+ {
84
+ type: "text",
85
+ value: "Dropdown",
86
+ },
87
+ ],
88
+ },
89
+ },
90
+ importPath: "@plasmicpkgs/antd/skinny/registerDropdown",
91
+ importName: "Dropdown",
92
+ };
93
+ function registerDropdown(loader, customDropdownMeta) {
94
+ var doRegisterComponent = function () {
95
+ var args = [];
96
+ for (var _i = 0; _i < arguments.length; _i++) {
97
+ args[_i] = arguments[_i];
98
+ }
99
+ return loader ? loader.registerComponent.apply(loader, args) : registerComponent__default['default'].apply(void 0, args);
100
+ };
101
+ doRegisterComponent(Dropdown, customDropdownMeta !== null && customDropdownMeta !== void 0 ? customDropdownMeta : dropdownMeta);
102
+ }
103
+ var dropdownButtonMeta = {
104
+ name: "AntdDropdownButton",
105
+ displayName: "Antd Dropdown Button",
106
+ props: {
107
+ disabled: {
108
+ type: "boolean",
109
+ description: "Whether the dropdown menu is disabled",
110
+ defaultValueHint: false,
111
+ },
112
+ icon: {
113
+ type: "slot",
114
+ hidePlaceholder: true,
115
+ },
116
+ overlay: {
117
+ type: "slot",
118
+ allowedComponents: ["AntdMenu"],
119
+ defaultValue: [
120
+ {
121
+ type: "component",
122
+ name: "AntdMenu",
123
+ },
124
+ ],
125
+ },
126
+ placement: {
127
+ type: "choice",
128
+ options: [
129
+ "bottomLeft",
130
+ "bottomCenter",
131
+ "bottomRight",
132
+ "topLeft",
133
+ "topCenter",
134
+ "topRight",
135
+ ],
136
+ description: "Placement of popup menu",
137
+ defaultValueHint: "bottomLeft",
138
+ },
139
+ size: {
140
+ type: "choice",
141
+ options: ["small", "medium", "large"],
142
+ description: "Set the size of button",
143
+ defaultValueHint: "medium",
144
+ },
145
+ trigger: {
146
+ type: "choice",
147
+ options: ["click", "hover", "contextMenu"],
148
+ description: "The trigger mode which executes the dropdown action",
149
+ defaultValueHint: "hover",
150
+ },
151
+ type: {
152
+ type: "choice",
153
+ options: ["default", "primary", "ghost", "dashed", "link", "text"],
154
+ description: "Can be set to primary, ghost, dashed, link, text, default",
155
+ defaultValueHint: "default",
156
+ },
157
+ visible: {
158
+ type: "boolean",
159
+ description: "Toggle visibility of dropdown menu in Plasmic Editor",
160
+ editOnly: true,
161
+ defaultValueHint: false,
162
+ },
163
+ children: {
164
+ type: "slot",
165
+ defaultValue: [
166
+ {
167
+ type: "text",
168
+ value: "Dropdown",
169
+ },
170
+ ],
171
+ },
172
+ },
173
+ importPath: "antd/lib/dropdown/dropdown-button",
174
+ importName: "DropdownButton",
175
+ parentComponentName: "AntdDropdown",
176
+ isDefaultExport: true,
177
+ };
178
+ function registerDropdownButton(loader, customDropdownButtonMeta) {
179
+ var doRegisterComponent = function () {
180
+ var args = [];
181
+ for (var _i = 0; _i < arguments.length; _i++) {
182
+ args[_i] = arguments[_i];
183
+ }
184
+ return loader ? loader.registerComponent.apply(loader, args) : registerComponent__default['default'].apply(void 0, args);
185
+ };
186
+ doRegisterComponent(DropdownButton__default['default'], customDropdownButtonMeta !== null && customDropdownButtonMeta !== void 0 ? customDropdownButtonMeta : dropdownButtonMeta);
187
+ }
188
+
189
+ exports.Dropdown = Dropdown;
190
+ exports.dropdownButtonMeta = dropdownButtonMeta;
191
+ exports.dropdownMeta = dropdownMeta;
192
+ exports.registerDropdown = registerDropdown;
193
+ exports.registerDropdownButton = registerDropdownButton;
194
+ //# sourceMappingURL=registerDropdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerDropdown.js","sources":["../src/registerDropdown.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport AntdDropdown, {\n DropdownButtonProps,\n DropDownProps,\n} from \"antd/lib/dropdown\";\nimport DropdownButton from \"antd/lib/dropdown/dropdown-button\";\nimport React from \"react\";\nimport { Registerable } from \"./registerable\";\n\nexport class Dropdown extends React.Component<DropDownProps> {\n render() {\n const finalProps = { ...this.props };\n finalProps.children =\n typeof this.props.children === \"string\" ? (\n <div>{this.props.children}</div>\n ) : (\n this.props.children\n );\n return <AntdDropdown {...finalProps}>{}</AntdDropdown>;\n }\n}\n\nexport const dropdownMeta: ComponentMeta<DropDownProps> = {\n name: \"AntdDropdown\",\n displayName: \"Antd Dropdown\",\n props: {\n arrow: {\n type: \"boolean\",\n description: \"Whether the dropdown arrow should be visible\",\n defaultValueHint: false,\n },\n disabled: {\n type: \"boolean\",\n description: \"Whether the dropdown menu is disabled\",\n defaultValueHint: false,\n },\n overlay: {\n type: \"slot\",\n allowedComponents: [\"AntdMenu\"],\n defaultValue: [\n {\n type: \"component\",\n name: \"AntdMenu\",\n },\n ],\n },\n placement: {\n type: \"choice\",\n options: [\n \"bottomLeft\",\n \"bottomCenter\",\n \"bottomRight\",\n \"topLeft\",\n \"topCenter\",\n \"topRight\",\n ],\n description: \"Placement of popup menu\",\n defaultValueHint: \"bottomLeft\",\n },\n trigger: {\n type: \"choice\",\n options: [\"click\", \"hover\", \"contextMenu\"],\n description: \"The trigger mode which executes the dropdown action\",\n defaultValueHint: \"hover\",\n },\n visible: {\n type: \"boolean\",\n description: \"Toggle visibility of dropdown menu in Plasmic Editor\",\n editOnly: true,\n defaultValueHint: false,\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"text\",\n value: \"Dropdown\",\n },\n ],\n },\n },\n importPath: \"@plasmicpkgs/antd/skinny/registerDropdown\",\n importName: \"Dropdown\",\n};\n\nexport function registerDropdown(\n loader?: Registerable,\n customDropdownMeta?: ComponentMeta<DropDownProps>\n) {\n const doRegisterComponent: typeof registerComponent = (...args) =>\n loader ? loader.registerComponent(...args) : registerComponent(...args);\n doRegisterComponent(Dropdown, customDropdownMeta ?? dropdownMeta);\n}\n\nexport const dropdownButtonMeta: ComponentMeta<DropdownButtonProps> = {\n name: \"AntdDropdownButton\",\n displayName: \"Antd Dropdown Button\",\n props: {\n disabled: {\n type: \"boolean\",\n description: \"Whether the dropdown menu is disabled\",\n defaultValueHint: false,\n },\n icon: {\n type: \"slot\",\n hidePlaceholder: true,\n },\n overlay: {\n type: \"slot\",\n allowedComponents: [\"AntdMenu\"],\n defaultValue: [\n {\n type: \"component\",\n name: \"AntdMenu\",\n },\n ],\n },\n placement: {\n type: \"choice\",\n options: [\n \"bottomLeft\",\n \"bottomCenter\",\n \"bottomRight\",\n \"topLeft\",\n \"topCenter\",\n \"topRight\",\n ],\n description: \"Placement of popup menu\",\n defaultValueHint: \"bottomLeft\",\n },\n size: {\n type: \"choice\",\n options: [\"small\", \"medium\", \"large\"],\n description: \"Set the size of button\",\n defaultValueHint: \"medium\",\n },\n trigger: {\n type: \"choice\",\n options: [\"click\", \"hover\", \"contextMenu\"],\n description: \"The trigger mode which executes the dropdown action\",\n defaultValueHint: \"hover\",\n },\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 visible: {\n type: \"boolean\",\n description: \"Toggle visibility of dropdown menu in Plasmic Editor\",\n editOnly: true,\n defaultValueHint: false,\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"text\",\n value: \"Dropdown\",\n },\n ],\n },\n },\n importPath: \"antd/lib/dropdown/dropdown-button\",\n importName: \"DropdownButton\",\n parentComponentName: \"AntdDropdown\",\n isDefaultExport: true,\n};\n\nexport function registerDropdownButton(\n loader?: Registerable,\n customDropdownButtonMeta?: ComponentMeta<DropDownProps>\n) {\n const doRegisterComponent: typeof registerComponent = (...args) =>\n loader ? loader.registerComponent(...args) : registerComponent(...args);\n doRegisterComponent(\n DropdownButton,\n customDropdownButtonMeta ?? dropdownButtonMeta\n );\n}\n"],"names":["__extends","React","AntdDropdown","registerComponent","DropdownButton"],"mappings":";;;;;;;;;;;;;;;;;;IAW8BA,sCAA8B;IAA5D;;KAWC;IAVC,yBAAM,GAAN;QACE,IAAM,UAAU,0BAAQ,IAAI,CAAC,KAAK,CAAE,CAAC;QACrC,UAAU,CAAC,QAAQ;YACjB,OAA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app/host/registerComponent";
2
+ import { InputProps } from "antd/lib/input";
3
+ import { GroupProps, PasswordProps, SearchProps, TextAreaProps } from "antd/lib/input";
4
+ import { Registerable } from "./registerable";
5
+ export declare const inputMeta: ComponentMeta<InputProps>;
6
+ export declare function registerInput(loader?: Registerable, customInputMeta?: ComponentMeta<InputProps>): void;
7
+ export declare const inputTextAreaMeta: ComponentMeta<TextAreaProps>;
8
+ export declare function registerInputTextArea(loader?: Registerable, customInputTextAreaMeta?: ComponentMeta<TextAreaProps>): void;
9
+ export declare const inputSearchMeta: ComponentMeta<SearchProps>;
10
+ export declare function registerInputSearch(loader?: Registerable, customInputSearchMeta?: ComponentMeta<SearchProps>): void;
11
+ export declare const inputPasswordMeta: ComponentMeta<PasswordProps>;
12
+ export declare function registerInputPassword(loader?: Registerable, customInputPasswordMeta?: ComponentMeta<PasswordProps>): void;
13
+ export declare const inputGroupMeta: ComponentMeta<GroupProps>;
14
+ export declare function registerInputGroup(loader?: Registerable, customInputGroupMeta?: ComponentMeta<GroupProps>): void;