@plasmicpkgs/antd 2.0.5 → 2.0.7

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 (76) hide show
  1. package/dist/antd.cjs.development.js +2242 -0
  2. package/dist/antd.cjs.development.js.map +1 -0
  3. package/dist/antd.cjs.production.min.js +2 -0
  4. package/dist/antd.cjs.production.min.js.map +1 -0
  5. package/dist/antd.css +27184 -0
  6. package/dist/antd.esm.js +637 -724
  7. package/dist/antd.esm.js.map +1 -1
  8. package/dist/customControls.d.ts +17 -17
  9. package/dist/index.d.ts +16 -16
  10. package/dist/index.js +5 -2353
  11. package/dist/registerButton.d.ts +5 -5
  12. package/dist/registerCarousel.d.ts +5 -5
  13. package/dist/registerCheckbox.d.ts +8 -8
  14. package/dist/registerCollapse.d.ts +14 -14
  15. package/dist/registerDropdown.d.ts +11 -11
  16. package/dist/registerInput.d.ts +14 -13
  17. package/dist/registerMenu.d.ts +15 -14
  18. package/dist/registerOption.d.ts +8 -8
  19. package/dist/registerRate.d.ts +5 -5
  20. package/dist/registerSelect.d.ts +8 -8
  21. package/dist/registerSlider.d.ts +19 -19
  22. package/dist/registerSwitch.d.ts +5 -5
  23. package/dist/registerTable.d.ts +30 -30
  24. package/dist/registerTabs.d.ts +13 -14
  25. package/dist/registerable.d.ts +4 -4
  26. package/package.json +7 -9
  27. package/skinny/customControls-8143c119.js +27 -0
  28. package/skinny/{customControls-f5378e2f.js.map → customControls-8143c119.js.map} +1 -1
  29. package/skinny/customControls.d.ts +17 -17
  30. package/skinny/index.d.ts +16 -0
  31. package/skinny/package.json +2 -2
  32. package/skinny/registerButton.d.ts +5 -5
  33. package/skinny/registerButton.js +94 -78
  34. package/skinny/registerButton.js.map +1 -1
  35. package/skinny/registerCarousel.d.ts +5 -5
  36. package/skinny/registerCarousel.js +80 -64
  37. package/skinny/registerCarousel.js.map +1 -1
  38. package/skinny/registerCheckbox.d.ts +8 -8
  39. package/skinny/registerCheckbox.js +140 -123
  40. package/skinny/registerCheckbox.js.map +1 -1
  41. package/skinny/registerCollapse.d.ts +14 -14
  42. package/skinny/registerCollapse.js +173 -172
  43. package/skinny/registerCollapse.js.map +1 -1
  44. package/skinny/registerDropdown.d.ts +11 -11
  45. package/skinny/registerDropdown.js +190 -172
  46. package/skinny/registerDropdown.js.map +1 -1
  47. package/skinny/registerInput.d.ts +14 -13
  48. package/skinny/registerInput.js +341 -360
  49. package/skinny/registerInput.js.map +1 -1
  50. package/skinny/registerMenu.d.ts +15 -14
  51. package/skinny/registerMenu.js +326 -274
  52. package/skinny/registerMenu.js.map +1 -1
  53. package/skinny/registerOption.d.ts +8 -8
  54. package/skinny/registerOption.js +95 -72
  55. package/skinny/registerOption.js.map +1 -1
  56. package/skinny/registerRate.d.ts +5 -5
  57. package/skinny/registerSelect.d.ts +8 -8
  58. package/skinny/registerSelect.js +144 -128
  59. package/skinny/registerSelect.js.map +1 -1
  60. package/skinny/registerSlider.d.ts +19 -19
  61. package/skinny/registerSlider.js +120 -130
  62. package/skinny/registerSlider.js.map +1 -1
  63. package/skinny/registerSwitch.d.ts +5 -5
  64. package/skinny/registerSwitch.js +69 -53
  65. package/skinny/registerSwitch.js.map +1 -1
  66. package/skinny/registerTable.d.ts +30 -30
  67. package/skinny/registerTable.js +204 -201
  68. package/skinny/registerTable.js.map +1 -1
  69. package/skinny/registerTabs.d.ts +13 -14
  70. package/skinny/registerTabs.js +330 -342
  71. package/skinny/registerTabs.js.map +1 -1
  72. package/skinny/registerable.d.ts +4 -4
  73. package/skinny/tslib.es6-40998fef.js +59 -0
  74. package/skinny/tslib.es6-40998fef.js.map +1 -0
  75. package/dist/index.js.map +0 -1
  76. package/skinny/customControls-f5378e2f.js +0 -20
@@ -1,176 +1,194 @@
1
- import registerComponent from '@plasmicapp/host/registerComponent';
2
- import AntdDropdown from 'antd/es/dropdown';
3
- import DropdownButton from 'antd/es/dropdown/dropdown-button';
4
- import React from 'react';
1
+ 'use strict';
5
2
 
6
- var __defProp = Object.defineProperty;
7
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
- var __spreadValues = (a, b) => {
12
- for (var prop in b || (b = {}))
13
- if (__hasOwnProp.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- if (__getOwnPropSymbols)
16
- for (var prop of __getOwnPropSymbols(b)) {
17
- if (__propIsEnum.call(b, prop))
18
- __defNormalProp(a, prop, b[prop]);
19
- }
20
- return a;
21
- };
22
- class Dropdown extends React.Component {
23
- render() {
24
- const finalProps = __spreadValues({}, this.props);
25
- finalProps.children = typeof this.props.children === "string" ? /* @__PURE__ */ React.createElement("div", null, this.props.children) : this.props.children;
26
- return /* @__PURE__ */ React.createElement(AntdDropdown, __spreadValues({}, finalProps));
27
- }
28
- }
29
- const dropdownMeta = {
30
- name: "AntdDropdown",
31
- displayName: "Antd Dropdown",
32
- props: {
33
- arrow: {
34
- type: "boolean",
35
- description: "Whether the dropdown arrow should be visible",
36
- defaultValueHint: false
37
- },
38
- disabled: {
39
- type: "boolean",
40
- description: "Whether the dropdown menu is disabled",
41
- defaultValueHint: false
42
- },
43
- overlay: {
44
- type: "slot",
45
- allowedComponents: ["AntdMenu"],
46
- defaultValue: [
47
- {
48
- type: "component",
49
- name: "AntdMenu"
50
- }
51
- ]
52
- },
53
- placement: {
54
- type: "choice",
55
- options: [
56
- "bottomLeft",
57
- "bottomCenter",
58
- "bottomRight",
59
- "topLeft",
60
- "topCenter",
61
- "topRight"
62
- ],
63
- description: "Placement of popup menu",
64
- defaultValueHint: "bottomLeft"
65
- },
66
- trigger: {
67
- type: "choice",
68
- options: ["click", "hover", "contextMenu"],
69
- description: "The trigger mode which executes the dropdown action",
70
- defaultValueHint: "hover"
71
- },
72
- visible: {
73
- type: "boolean",
74
- description: "Toggle visibility of dropdown menu in Plasmic Editor",
75
- editOnly: true,
76
- defaultValueHint: false
77
- },
78
- children: {
79
- type: "slot",
80
- defaultValue: [
81
- {
82
- type: "text",
83
- value: "Dropdown"
84
- }
85
- ]
86
- }
87
- },
88
- importPath: "@plasmicpkgs/antd/skinny/registerDropdown",
89
- importName: "Dropdown"
90
- };
91
- function registerDropdown(loader, customDropdownMeta) {
92
- const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
93
- doRegisterComponent(Dropdown, customDropdownMeta != null ? customDropdownMeta : dropdownMeta);
94
- }
95
- const dropdownButtonMeta = {
96
- name: "AntdDropdownButton",
97
- displayName: "Antd Dropdown Button",
98
- props: {
99
- disabled: {
100
- type: "boolean",
101
- description: "Whether the dropdown menu is disabled",
102
- defaultValueHint: false
103
- },
104
- icon: {
105
- type: "slot",
106
- hidePlaceholder: true
107
- },
108
- overlay: {
109
- type: "slot",
110
- allowedComponents: ["AntdMenu"],
111
- defaultValue: [
112
- {
113
- type: "component",
114
- name: "AntdMenu"
115
- }
116
- ]
117
- },
118
- placement: {
119
- type: "choice",
120
- options: [
121
- "bottomLeft",
122
- "bottomCenter",
123
- "bottomRight",
124
- "topLeft",
125
- "topCenter",
126
- "topRight"
127
- ],
128
- description: "Placement of popup menu",
129
- defaultValueHint: "bottomLeft"
130
- },
131
- size: {
132
- type: "choice",
133
- options: ["small", "medium", "large"],
134
- description: "Set the size of button",
135
- defaultValueHint: "medium"
136
- },
137
- trigger: {
138
- type: "choice",
139
- options: ["click", "hover", "contextMenu"],
140
- description: "The trigger mode which executes the dropdown action",
141
- defaultValueHint: "hover"
142
- },
143
- type: {
144
- type: "choice",
145
- options: ["default", "primary", "ghost", "dashed", "link", "text"],
146
- description: "Can be set to primary, ghost, dashed, link, text, default",
147
- defaultValueHint: "default"
148
- },
149
- visible: {
150
- type: "boolean",
151
- description: "Toggle visibility of dropdown menu in Plasmic Editor",
152
- editOnly: true,
153
- defaultValueHint: false
154
- },
155
- children: {
156
- type: "slot",
157
- defaultValue: [
158
- {
159
- type: "text",
160
- value: "Dropdown"
161
- }
162
- ]
163
- }
164
- },
165
- importPath: "antd/es/dropdown/dropdown-button",
166
- importName: "DropdownButton",
167
- parentComponentName: "AntdDropdown",
168
- isDefaultExport: true
169
- };
170
- function registerDropdownButton(loader, customDropdownButtonMeta) {
171
- const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
172
- doRegisterComponent(DropdownButton, customDropdownButtonMeta != null ? customDropdownButtonMeta : dropdownButtonMeta);
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);
173
187
  }
174
188
 
175
- export { Dropdown, dropdownButtonMeta, dropdownMeta, registerDropdown, registerDropdownButton };
189
+ exports.Dropdown = Dropdown;
190
+ exports.dropdownButtonMeta = dropdownButtonMeta;
191
+ exports.dropdownMeta = dropdownMeta;
192
+ exports.registerDropdown = registerDropdown;
193
+ exports.registerDropdownButton = registerDropdownButton;
176
194
  //# sourceMappingURL=registerDropdown.js.map
@@ -1 +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/es/dropdown\";\nimport DropdownButton from \"antd/es/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/es/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":[],"mappings":";;;;;;;;;;;;;;;;;;;;;MAWa,iBAAiB,MAAM,UAAyB;AAAA,EAC3D,SAAS;AACP,UAAM,aAAa,mBAAK,KAAK;AAC7B,eAAW,WACT,OAAO,KAAK,MAAM,aAAa,+CAC5B,aAAK,KAAK,MAAM,QAAS,IAE1B,KAAK,MAAM;AAEf,+CAAQ,iCAAiB,WAAc;AAAA;AAE3C;MAEa,eAA6C;AAAA,EACxD,MAAM;AAAA,EACN,aAAa;AAAA,EACb,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,mBAAmB,CAAC,UAAU;AAAA,MAC9B,cAAc;AAAA,QACZ;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA;AACR;AACF;AACF,IACA,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,QACP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BAAkB;AAAA;AACpB,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS,CAAC,SAAS,SAAS,aAAa;AAAA,MACzC,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS,CAAC,WAAW,WAAW,SAAS,UAAU,QAAQ,MAAM;AAAA,MACjE,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,MACb,UAAU;AAAA,MACV,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,YAAY;AAAA,EACZ,qBAAqB;AAAA,EACrB,iBAAiB;AACnB;gCAGE,QACA,0BACA;AACA,QAAM,sBAAgD,IAAI,SACxD,SAAS,OAAO,kBAAkB,GAAG,IAAI,IAAI,kBAAkB,GAAG,IAAI;AACxE,sBACE,gBACA,8DAA4B,kBAC9B;AACF;;;;"}
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,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,QAAQ,IACrCC,qDAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAO,KAEhC,IAAI,CAAC,KAAK,CAAC,QAAQ,CACpB,CAAC;QACJ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O,EAAE,OAAO,EAAE,aAAa,CAAC;YAC1C,WAAW,EAAE,qDAAqD;YAClE,gBAAgB,EAAE,OAAO;SAC1B;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;YAClE,WAAW,EAAE,2DAA2D;YACxE,gBAAgB,EAAE,SAAS;SAC5B;QACD,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,sDAAsD;YACnE,QAAQ,EAAE,IAAI;YACd,gBAAgB,EAAE,KAAK;SACxB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,MAAM;YACZ,YAAY,EAAE;gBACZ;oBACE,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,UAAU;iBAClB;aACF;SACF;KACF;IACD,UAAU,EAAE,mCAAmC;IAC/C,UAAU,EAAE,gBAAgB;IAC5B,mBAAmB,EAAE,cAAc;IACnC,eAAe,EAAE,IAAI;EACrB;SAEc,sBAAsB,CACpC,MAAqB,EACrB,wBAAuD;IAEvD,IAAM,mBAAmB,GAA6B;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QAC5D,OAAA,MAAM,GAAG,MAAM,CAAC,iBAAiB,OAAxB,MAAM,EAAsB,IAAI,IAAIA,qCAAiB,eAAI,IAAI,CAAC;KAAA,CAAC;IAC1E,mBAAmB,CACjBC,kCAAc,EACd,wBAAwB,aAAxB,wBAAwB,cAAxB,wBAAwB,GAAI,kBAAkB,CAC/C,CAAC;AACJ;;;;;;;;"}
@@ -1,13 +1,14 @@
1
- import { ComponentMeta } from "@plasmicapp/host/registerComponent";
2
- import { GroupProps, InputProps, PasswordProps, SearchProps, TextAreaProps } from "antd/es/input";
3
- import { Registerable } from "./registerable";
4
- export declare const inputMeta: ComponentMeta<InputProps>;
5
- export declare function registerInput(loader?: Registerable, customInputMeta?: ComponentMeta<InputProps>): void;
6
- export declare const inputTextAreaMeta: ComponentMeta<TextAreaProps>;
7
- export declare function registerInputTextArea(loader?: Registerable, customInputTextAreaMeta?: ComponentMeta<TextAreaProps>): void;
8
- export declare const inputSearchMeta: ComponentMeta<SearchProps>;
9
- export declare function registerInputSearch(loader?: Registerable, customInputSearchMeta?: ComponentMeta<SearchProps>): void;
10
- export declare const inputPasswordMeta: ComponentMeta<PasswordProps>;
11
- export declare function registerInputPassword(loader?: Registerable, customInputPasswordMeta?: ComponentMeta<PasswordProps>): void;
12
- export declare const inputGroupMeta: ComponentMeta<GroupProps>;
13
- export declare function registerInputGroup(loader?: Registerable, customInputGroupMeta?: ComponentMeta<GroupProps>): void;
1
+ import { ComponentMeta } from "@plasmicapp/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;